Skip to content

[Gardening] Remove unused diagnostic definitions #28375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions include/swift/AST/DiagnosticsCommon.def
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ ERROR(sdk_node_unrecognized_accessor_kind,none,
ERROR(circular_reference, none,
"circular reference", ())

ERROR(redundant_type_alias_define, none,
"redundant type alias declaration", ())

NOTE(circular_reference_through, none,
"through reference here", ())

Expand Down
3 changes: 0 additions & 3 deletions include/swift/AST/DiagnosticsFrontend.def
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,6 @@ NOTE(compiled_module_invalid,none,
NOTE(compiled_module_invalid_reason,none,
"unable to load compiled module '%0': %1",
(StringRef, StringRef))
ERROR(error_extracting_dependencies_from_cached_module,none,
"error extracting dependencies from cached module '%0'",
(StringRef))
ERROR(unknown_forced_module_loading_mode,none,
"unknown value for SWIFT_FORCE_MODULE_LOADING variable: '%0'",
(StringRef))
Expand Down
17 changes: 0 additions & 17 deletions include/swift/AST/DiagnosticsParse.def
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,6 @@ ERROR(sil_dbg_unknown_key,none,
"unknown key '%0' in debug variable declaration", (StringRef))
ERROR(sil_objc_with_tail_elements,none,
"alloc_ref [objc] cannot have tail allocated elements", ())
ERROR(found_unqualified_instruction_in_qualified_function,none,
"found unqualified instruction in qualified function '%0'", (StringRef))
ERROR(sil_expected_access_kind,none,
"%0 instruction must have explicit access kind", (StringRef))
ERROR(sil_expected_access_enforcement,none,
Expand All @@ -605,9 +603,6 @@ ERROR(sil_keypath_unknown_component_kind,none,
ERROR(sil_keypath_computed_property_missing_part,none,
"keypath %select{gettable|settable}0_property component needs an "
"%select{id and getter|id, getter, and setter}0", (bool))
ERROR(sil_keypath_external_missing_part,none,
"keypath external component with indices needs an indices_equals and "
"indices_hash function", ())
ERROR(sil_keypath_no_root,none,
"keypath must have a root component declared",())
ERROR(sil_keypath_index_not_hashable,none,
Expand Down Expand Up @@ -684,8 +679,6 @@ ERROR(sil_witness_protocol_conformance_not_found,none,
"sil protocol conformance not found", ())

// SIL Coverage Map
ERROR(sil_coverage_func_not_found, none,
"sil function not found %0", (Identifier))
ERROR(sil_coverage_invalid_hash, none,
"expected coverage hash", ())
ERROR(sil_coverage_expected_lbrace, none,
Expand Down Expand Up @@ -1280,12 +1273,6 @@ ERROR(expr_selector_expected_rparen,PointsToFirstBadToken,
"expected ')' to complete '#selector' expression", ())

// Type-of expressions.
ERROR(expr_typeof_expected_label_of,PointsToFirstBadToken,
"expected argument label 'of:' within 'type(...)'", ())
ERROR(expr_typeof_expected_expr,PointsToFirstBadToken,
"expected an expression within 'type(of: ...)'", ())
ERROR(expr_typeof_expected_rparen,PointsToFirstBadToken,
"expected ')' to complete 'type(of: ...)' expression", ())
ERROR(expr_dynamictype_deprecated,PointsToFirstBadToken,
"'.dynamicType' is deprecated. Use 'type(of: ...)' instead", ())

Expand Down Expand Up @@ -1480,10 +1467,6 @@ WARNING(attr_warn_unused_result_removed,none,
ERROR(attr_warn_unused_result_expected_rparen,none,
"expected ')' after 'warn_unused_result' attribute", ())

// escaping
ERROR(attr_escaping_conflicts_noescape,none,
"@escaping conflicts with @noescape", ())

// _specialize
ERROR(attr_specialize_missing_colon,none,
"missing ':' after %0 in '_specialize' attribute", (StringRef))
Expand Down
2 changes: 0 additions & 2 deletions include/swift/AST/DiagnosticsRefactoring.def
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ ERROR(invalid_default_location, none, "given location is not on a default statem

ERROR(no_parent_switch, none, "cannot find enclosing switch statement", ())

ERROR(no_subject_enum, none, "cannot find subject enum in the enclosing switch statement", ())

ERROR(no_remaining_cases, none, "no remaining cases to expand", ())

WARNING(mismatched_rename, none, "the name at the given location cannot be renamed to '%0'", (StringRef))
Expand Down
5 changes: 0 additions & 5 deletions include/swift/AST/DiagnosticsSIL.def
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ ERROR(self_inside_catch_superselfinit,none,
"'self' used inside 'catch' block reachable from "
"%select{super|self}0.init call",
(unsigned))
ERROR(return_from_init_without_initing_self,none,
"return from initializer before 'self.init' call or assignment to 'self'", ())
ERROR(return_from_init_without_initing_stored_properties,none,
"return from initializer without initializing all"
" stored properties", ())
Expand Down Expand Up @@ -324,9 +322,6 @@ ERROR(integer_conversion_overflow_builtin_types,none,
WARNING(integer_conversion_overflow_warn,none,
"integer overflows when converted from %0 to %1",
(Type, Type))
ERROR(integer_conversion_sign_error,none,
"negative integer cannot be converted to unsigned type %0",
(Type))
ERROR(negative_integer_literal_overflow_unsigned,none,
"negative integer '%1' overflows when stored into unsigned type %0",
(Type, StringRef))
Expand Down
41 changes: 0 additions & 41 deletions include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ ERROR(expected_result_in_contextual_member,none,

ERROR(unexpected_arguments_in_enum_case,none,
"enum case %0 has no associated values", (DeclName))
ERROR(unexpected_arguments_in_contextual_member,none,
"%0 %1 is not a function", (DescriptiveDeclKind, DeclName))

ERROR(could_not_use_value_member,none,
"member %1 cannot be used on value of type %0", (Type, DeclName))
Expand Down Expand Up @@ -261,9 +259,6 @@ ERROR(cannot_pass_rvalue_inout,none,
ERROR(cannot_provide_default_value_inout,none,
"cannot provide default value to inout parameter %0", (Identifier))

ERROR(cannot_assign_to_literal,none,
"cannot assign to a literal value", ())

ERROR(cannot_call_with_no_params,none,
"cannot invoke %select{|initializer for type }1'%0' with no arguments",
(StringRef, bool))
Expand Down Expand Up @@ -440,8 +435,6 @@ NOTE(candidate_performs_illegal_ephemeral_conv,none,

ERROR(cannot_convert_argument_value_protocol,none,
"argument type %0 does not conform to expected type %1", (Type, Type))
ERROR(cannot_convert_partial_argument_value_protocol,none,
"in argument type %0, %1 does not conform to expected type %2", (Type, Type, Type))

ERROR(cannot_convert_argument_value_nil,none,
"'nil' is not compatible with expected argument type %0", (Type))
Expand Down Expand Up @@ -566,9 +559,6 @@ ERROR(cannot_convert_sequence_element_protocol,none,
ERROR(throws_functiontype_mismatch,none,
"invalid conversion from throwing function of type %0 to "
"non-throwing function type %1", (Type, Type))
ERROR(noescape_functiontype_mismatch,none,
"invalid conversion from non-escaping function of type %0 to "
"potentially escaping function type %1", (Type, Type))

// Key-path expressions.
ERROR(expr_keypath_no_objc_runtime,none,
Expand Down Expand Up @@ -1158,9 +1148,6 @@ ERROR(instance_member_in_initializer,none,
ERROR(instance_member_in_default_parameter,none,
"cannot use instance member %0 as a default parameter", (DeclName))

ERROR(invalid_initialization_parameter_same_type,none,
"invalid initializer call with same type %0 as parameter", (Type))

ERROR(missing_argument_named,none,
"missing argument for parameter %0 in call", (Identifier))
ERROR(missing_argument_positional,none,
Expand Down Expand Up @@ -1393,8 +1380,6 @@ ERROR(access_control_open_bad_decl,none,
"only classes and overridable class members can be declared 'open';"
" use 'public'", ())

ERROR(invalid_decl_attribute_simple,none,
"attribute cannot be applied to declaration", ())
ERROR(invalid_decl_attribute,none,
"'%0' attribute cannot be applied to this declaration", (DeclAttribute))
ERROR(invalid_decl_modifier,none,
Expand Down Expand Up @@ -2228,9 +2213,6 @@ ERROR(recursive_same_type_constraint,none,
"same-type constraint %0 == %1 is recursive", (Type, Type))
ERROR(recursive_superclass_constraint,none,
"superclass constraint %0 : %1 is recursive", (Type, Type))
ERROR(requires_same_type_conflict,none,
"%select{associated type|generic parameter}0 %1 cannot be equal to "
"both %2 and %3", (bool, Type, Type, Type))
ERROR(requires_generic_param_same_type_does_not_conform,none,
"same-type constraint type %0 does not conform to required protocol %1",
(Type, Identifier))
Expand Down Expand Up @@ -2905,9 +2887,6 @@ NOTE(found_candidate_type,none,

ERROR(no_MaxBuiltinFloatType_found,none,
"standard library error: _MaxBuiltinFloatType is not properly defined", ())
ERROR(integer_literal_overflows_maxwidth, none,
"integer literal needs %1 bits, exceeding limit of %0 bits",
(unsigned, unsigned))

ERROR(no_member_of_module,none,
"module %0 has no member named %1", (Identifier, DeclName))
Expand Down Expand Up @@ -3078,8 +3057,6 @@ ERROR(missing_protocol,none,
"missing protocol %0", (Identifier))
ERROR(nil_literal_broken_proto,none,
"protocol 'ExpressibleByNilLiteral' is broken", ())
ERROR(array_protocol_broken,none,
"protocol 'ExpressibleByArrayLiteral' is broken", ())
ERROR(builtin_integer_literal_broken_proto,none,
"protocol '_ExpressibleByBuiltinIntegerLiteral' is broken", ())
ERROR(integer_literal_broken_proto,none,
Expand Down Expand Up @@ -3120,8 +3097,6 @@ ERROR(should_use_empty_dictionary_literal,none,
"use [:] to get an empty dictionary literal", ())

// Dictionary literals
ERROR(dictionary_protocol_broken,none,
"ExpressibleByDictionaryLiteral protocol definition is broken", ())
ERROR(type_is_not_dictionary,none,
"contextual type %0 cannot be used with dictionary literal", (Type))

Expand Down Expand Up @@ -3432,12 +3407,6 @@ ERROR(assignment_let_property_delegating_init,none,
"'let' property %0 may not be initialized directly; use "
"\"self.init(...)\" or \"self = ...\" instead", (DeclName))

// ForEach Stmt
ERROR(sequence_protocol_broken,none,
"SequenceType protocol definition is broken", ())
ERROR(iterator_protocol_broken,none,
"IteratorProtocol protocol definition is broken", ())

ERROR(label_shadowed, none,
"label %0 cannot be reused on an inner statement", (Identifier))
ERROR(break_outside_loop,none,
Expand Down Expand Up @@ -3571,9 +3540,6 @@ ERROR(closure_tuple_parameter_destructuring,none,
ERROR(closure_tuple_parameter_destructuring_implicit,none,
"closure tuple parameter %0 does not support destructuring "
"with implicit parameters", (Type))
ERROR(nested_tuple_parameter_destructuring,none,
"nested tuple parameter %0 of function %1 "
"does not support destructuring", (Type, Type))
ERROR(single_tuple_parameter_mismatch_special,none,
"%0 expects a single parameter of type %1%2",
(DescriptiveDeclKind, Type, StringRef))
Expand Down Expand Up @@ -4123,14 +4089,9 @@ ERROR(nonlocal_bridged_to_objc,none,
"conformance of %0 to %1 can only be written in module %2",
(Identifier, Identifier, Identifier))

ERROR(broken_bridged_to_objc_protocol,none,
"_BridgedToObjectiveC protocol is broken", ())

ERROR(missing_bridging_function,Fatal,
"missing '%select{_forceBridgeFromObjectiveC|"
"_conditionallyBridgeFromObjectiveC}0'", (bool))
ERROR(missing_nserror_bridging_function,none,
"missing _bridgeNSError", ())

#define OBJC_DIAG_SELECT "%select{initializer %1|implicit initializer %1|deinitializer|implicit deinitializer|method %1|getter for %1|subscript getter|setter for %1|subscript setter}0"

Expand Down Expand Up @@ -4489,8 +4450,6 @@ ERROR(specialize_attr_only_generic_param_req,none,
"Only requirements on generic parameters are supported by '_specialize' attribute", ())
ERROR(specialize_attr_only_one_concrete_same_type_req,none,
"Only one concrete type should be used in the same-type requirement in '_specialize' attribute", ())
ERROR(specialize_attr_non_nominal_type_constraint_req,none,
"Only conformances to nominal types are supported by '_specialize' attribute", ())
ERROR(specialize_attr_non_protocol_type_constraint_req,none,
"Only conformances to protocol types are supported by '_specialize' attribute", ())
ERROR(specialize_attr_type_parameter_count_mismatch,none,
Expand Down