From caa9b04ad8faa88f31d558542a2eaa3aa97654e6 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 15:37:47 +0000 Subject: [PATCH] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 26 +++++++++++++--- unified/ql/lib/unified.dbscheme | 44 +++++++++++++++++++-------- 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index e2be15932be..8fd4e61ed32 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -1171,6 +1171,24 @@ module Swift { } } + /** A class representing `implicitly_unwrapped_type` nodes. */ + class ImplicitlyUnwrappedType extends @swift_implicitly_unwrapped_type, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "ImplicitlyUnwrappedType" } + + /** Gets the node corresponding to the field `name`. */ + final UnannotatedType getName() { swift_implicitly_unwrapped_type_def(this, result) } + + /** Gets the child of this node. */ + final TypeModifiers getChild() { swift_implicitly_unwrapped_type_child(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_implicitly_unwrapped_type_def(this, result) or + swift_implicitly_unwrapped_type_child(this, result) + } + } + /** A class representing `import_declaration` nodes. */ class ImportDeclaration extends @swift_import_declaration, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -1221,7 +1239,7 @@ module Swift { } /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_inheritance_constraint_def(this, result) } + final UnannotatedType getName() { swift_inheritance_constraint_name(this, result) } /** Gets the `i`th child of this node. */ final Attribute getChild(int i) { swift_inheritance_constraint_child(this, i, result) } @@ -1230,7 +1248,7 @@ module Swift { final override AstNode getAFieldOrChild() { swift_inheritance_constraint_constrained_type(this, _, result) or swift_inheritance_constraint_inherits_from(this, _, result) or - swift_inheritance_constraint_def(this, result) or + swift_inheritance_constraint_name(this, result) or swift_inheritance_constraint_child(this, _, result) } } @@ -2512,14 +2530,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "TypeAnnotation" } /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_type_annotation_def(this, result) } + final UnannotatedType getName() { swift_type_annotation_name(this, result) } /** Gets the node corresponding to the field `type`. */ final AstNode getType(int i) { swift_type_annotation_type(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_type_annotation_def(this, result) or swift_type_annotation_type(this, _, result) + swift_type_annotation_name(this, result) or swift_type_annotation_type(this, _, result) } } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index d78f5fe5fc6..748a2dfc4a5 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -852,7 +852,7 @@ swift_function_declaration_name( unique int name: @swift_function_declaration_name_type ref ); -@swift_function_declaration_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_function_declaration, index] swift_function_declaration_return_type( @@ -984,6 +984,16 @@ swift_if_statement_def( unique int id: @swift_if_statement ); +swift_implicitly_unwrapped_type_child( + unique int swift_implicitly_unwrapped_type: @swift_implicitly_unwrapped_type ref, + unique int child: @swift_type_modifiers ref +); + +swift_implicitly_unwrapped_type_def( + unique int id: @swift_implicitly_unwrapped_type, + int name: @swift_unannotated_type ref +); + @swift_import_declaration_child_type = @swift_identifier | @swift_modifiers #keyset[swift_import_declaration, index] @@ -1013,7 +1023,7 @@ swift_inheritance_constraint_constrained_type( unique int constrained_type: @swift_inheritance_constraint_constrained_type_type ref ); -@swift_inheritance_constraint_inherits_from_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_inheritance_constraint_inherits_from_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_inheritance_constraint, index] swift_inheritance_constraint_inherits_from( @@ -1022,6 +1032,11 @@ swift_inheritance_constraint_inherits_from( unique int inherits_from: @swift_inheritance_constraint_inherits_from_type ref ); +swift_inheritance_constraint_name( + unique int swift_inheritance_constraint: @swift_inheritance_constraint ref, + unique int name: @swift_unannotated_type ref +); + #keyset[swift_inheritance_constraint, index] swift_inheritance_constraint_child( int swift_inheritance_constraint: @swift_inheritance_constraint ref, @@ -1030,8 +1045,7 @@ swift_inheritance_constraint_child( ); swift_inheritance_constraint_def( - unique int id: @swift_inheritance_constraint, - int name: @swift_unannotated_type ref + unique int id: @swift_inheritance_constraint ); @swift_inheritance_specifier_inherits_from_type = @swift_function_type | @swift_suppressed_constraint | @swift_user_type @@ -1121,7 +1135,7 @@ swift_lambda_function_type_name( unique int name: @swift_unannotated_type ref ); -@swift_lambda_function_type_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_lambda_function_type_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_lambda_function_type, index] swift_lambda_function_type_return_type( @@ -1191,7 +1205,7 @@ swift_lambda_parameter_name( unique int name: @swift_lambda_parameter_name_type ref ); -@swift_lambda_parameter_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_lambda_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_lambda_parameter, index] swift_lambda_parameter_type( @@ -1425,7 +1439,7 @@ swift_parameter_name( unique int name: @swift_parameter_name_type ref ); -@swift_parameter_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_parameter, index] swift_parameter_type( @@ -1643,7 +1657,7 @@ swift_protocol_function_declaration_name( unique int name: @swift_protocol_function_declaration_name_type ref ); -@swift_protocol_function_declaration_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_protocol_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_return_type( @@ -1823,7 +1837,7 @@ swift_subscript_declaration_name( unique int name: @swift_unannotated_type ref ); -@swift_subscript_declaration_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_subscript_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_subscript_declaration, index] swift_subscript_declaration_return_type( @@ -1970,7 +1984,12 @@ swift_tuple_type_item_def( unique int id: @swift_tuple_type_item ); -@swift_type_annotation_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +swift_type_annotation_name( + unique int swift_type_annotation: @swift_type_annotation ref, + unique int name: @swift_unannotated_type ref +); + +@swift_type_annotation_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_type_annotation, index] swift_type_annotation_type( @@ -1980,8 +1999,7 @@ swift_type_annotation_type( ); swift_type_annotation_def( - unique int id: @swift_type_annotation, - int name: @swift_unannotated_type ref + unique int id: @swift_type_annotation ); #keyset[swift_type_arguments, index] @@ -2305,7 +2323,7 @@ case @swift_token.kind of ; -@swift_ast_node = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_attribute | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @swift_computed_getter | @swift_computed_modify | @swift_computed_property | @swift_computed_setter | @swift_conjunction_expression | @swift_constructor_expression | @swift_constructor_suffix | @swift_control_transfer_statement | @swift_deinit_declaration | @swift_deprecated_operator_declaration_body | @swift_dictionary_literal | @swift_dictionary_type | @swift_didset_clause | @swift_directive | @swift_directly_assignable_expression | @swift_disjunction_expression | @swift_do_statement | @swift_enum_class_body | @swift_enum_entry | @swift_enum_type_parameters | @swift_equality_constraint | @swift_equality_expression | @swift_existential_type | @swift_external_macro_definition | @swift_for_statement | @swift_function_body | @swift_function_declaration | @swift_function_type | @swift_getter_specifier | @swift_guard_statement | @swift_identifier | @swift_if_condition | @swift_if_statement | @swift_import_declaration | @swift_infix_expression | @swift_inheritance_constraint | @swift_inheritance_specifier | @swift_init_declaration | @swift_interpolated_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_function_type | @swift_lambda_function_type_parameters | @swift_lambda_literal | @swift_lambda_parameter | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_definition | @swift_macro_invocation | @swift_metatype | @swift_modifiers | @swift_modify_specifier | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_navigation_suffix | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_optional_type | @swift_parameter | @swift_parameter_modifiers | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_attribute | @swift_precedence_group_attributes | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_body | @swift_protocol_composition_type | @swift_protocol_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_protocol_property_requirements | @swift_range_expression | @swift_raw_str_interpolation | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_setter_specifier | @swift_source_file | @swift_statements | @swift_subscript_declaration | @swift_suppressed_constraint | @swift_switch_entry | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_throws_clause | @swift_token | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_tuple_type_item | @swift_type_annotation | @swift_type_arguments | @swift_type_constraint | @swift_type_constraints | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter | @swift_type_parameter_modifiers | @swift_type_parameter_pack | @swift_type_parameters | @swift_typealias_declaration | @swift_user_type | @swift_value_argument | @swift_value_argument_label | @swift_value_arguments | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause | @swift_while_statement | @swift_willset_clause | @swift_willset_didset_block +@swift_ast_node = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_attribute | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @swift_computed_getter | @swift_computed_modify | @swift_computed_property | @swift_computed_setter | @swift_conjunction_expression | @swift_constructor_expression | @swift_constructor_suffix | @swift_control_transfer_statement | @swift_deinit_declaration | @swift_deprecated_operator_declaration_body | @swift_dictionary_literal | @swift_dictionary_type | @swift_didset_clause | @swift_directive | @swift_directly_assignable_expression | @swift_disjunction_expression | @swift_do_statement | @swift_enum_class_body | @swift_enum_entry | @swift_enum_type_parameters | @swift_equality_constraint | @swift_equality_expression | @swift_existential_type | @swift_external_macro_definition | @swift_for_statement | @swift_function_body | @swift_function_declaration | @swift_function_type | @swift_getter_specifier | @swift_guard_statement | @swift_identifier | @swift_if_condition | @swift_if_statement | @swift_implicitly_unwrapped_type | @swift_import_declaration | @swift_infix_expression | @swift_inheritance_constraint | @swift_inheritance_specifier | @swift_init_declaration | @swift_interpolated_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_function_type | @swift_lambda_function_type_parameters | @swift_lambda_literal | @swift_lambda_parameter | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_definition | @swift_macro_invocation | @swift_metatype | @swift_modifiers | @swift_modify_specifier | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_navigation_suffix | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_optional_type | @swift_parameter | @swift_parameter_modifiers | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_attribute | @swift_precedence_group_attributes | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_body | @swift_protocol_composition_type | @swift_protocol_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_protocol_property_requirements | @swift_range_expression | @swift_raw_str_interpolation | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_setter_specifier | @swift_source_file | @swift_statements | @swift_subscript_declaration | @swift_suppressed_constraint | @swift_switch_entry | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_throws_clause | @swift_token | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_tuple_type_item | @swift_type_annotation | @swift_type_arguments | @swift_type_constraint | @swift_type_constraints | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter | @swift_type_parameter_modifiers | @swift_type_parameter_pack | @swift_type_parameters | @swift_typealias_declaration | @swift_user_type | @swift_value_argument | @swift_value_argument_label | @swift_value_arguments | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause | @swift_while_statement | @swift_willset_clause | @swift_willset_didset_block swift_ast_node_location( unique int node: @swift_ast_node ref,