Skip to content

Remove unused diagnostics. #75273

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
Jul 16, 2024
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
1 change: 0 additions & 1 deletion include/swift/AST/DiagnosticsClangImporter.def
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ NOTE(macro_not_imported_unsupported_named_operator, none, "operator '%0' not sup
NOTE(macro_not_imported_invalid_string_literal, none, "invalid string literal", ())
NOTE(macro_not_imported_invalid_numeric_literal, none, "invalid numeric literal", ())
NOTE(macro_not_imported_unsupported_literal, none, "only numeric and string macro literals supported", ())
NOTE(macro_not_imported_nested_cast, none, "non-null nested casts not supported", ())

NOTE(macro_not_imported_function_like, none, "macro '%0' unavailable: function like macros not supported", (StringRef))
NOTE(macro_not_imported_unsupported_structure, none, "macro '%0' unavailable: structure not supported", (StringRef))
Expand Down
2 changes: 0 additions & 2 deletions include/swift/AST/DiagnosticsCommon.def
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ NOTE(in_macro_expansion,none,
ERROR(macro_experimental,none,
"%0 macros are an experimental feature that is not enabled %select{|(%1)}1",
(StringRef, StringRef))
ERROR(ambiguous_macro_reference,none,
"ambiguous reference to macro %0", (DeclName))

//------------------------------------------------------------------------------
// MARK: bridged diagnostics
Expand Down
32 changes: 0 additions & 32 deletions include/swift/AST/DiagnosticsDriver.def
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@ ERROR(error_unsupported_option,none,
"option '%0' is not supported by '%1'; did you mean to use '%2'?",
(StringRef, StringRef, StringRef))

WARNING(incremental_requires_output_file_map,none,
"ignoring -incremental (currently requires an output file map)", ())
WARNING(incremental_requires_build_record_entry,none,
"ignoring -incremental; output file map has no master dependencies "
"entry (\"%0\" under \"\")", (StringRef))

WARNING(unable_to_open_incremental_comparison_log,none,
"unable to open incremental comparison log file '%0'", (StringRef))

ERROR(error_os_minimum_deployment,none,
"Swift requires a minimum deployment target of %0", (StringRef))
ERROR(error_sdk_too_old,none,
Expand All @@ -100,22 +91,6 @@ ERROR(error_unsupported_target_variant,none,
"unsupported '%select{-target|-target-variant}1' value '%0'; use 'ios-macabi' instead",
(StringRef, bool))

WARNING(warn_arclite_not_found_when_link_objc_runtime,none,
"unable to find Objective-C runtime support library 'arclite'; "
"pass '-no-link-objc-runtime' to silence this warning", ())

WARNING(warn_cannot_stat_input,none,
"unable to determine when '%0' was last modified: %1",
(StringRef, StringRef))

WARNING(warn_unable_to_load_dependencies, none,
"unable to load dependencies file \"%0\", disabling incremental mode",
(StringRef))

ERROR(error_input_changed_during_build,none,
"input file '%0' was modified during the build",
(StringRef))

ERROR(error_conflicting_options, none,
"conflicting options '%0' and '%1'",
(StringRef, StringRef))
Expand All @@ -131,9 +106,6 @@ WARNING(warn_ignore_embed_bitcode_marker, none,
WARNING(verify_debug_info_requires_debug_option,none,
"ignoring '-verify-debug-info'; no debug info is being generated", ())

ERROR(verify_incremental_dependencies_needs_incremental,none,
"'-verify-incremental-dependencies' requires '-incremental'", ())

ERROR(error_profile_missing,none,
"no profdata file exists at '%0'", (StringRef))

Expand All @@ -152,10 +124,6 @@ WARNING(warn_use_filelists_deprecated, none,
"the option '-driver-use-filelists' is deprecated; use "
"'-driver-filelist-threshold=0' instead", ())

WARNING(warn_unable_to_load_primary, none,
"unable to load primary swift file \"%0\", %1",
(StringRef, StringRef))

ERROR(cannot_find_migration_script, none,
"missing migration script from path '%0'", (StringRef))

Expand Down
13 changes: 0 additions & 13 deletions include/swift/AST/DiagnosticsFrontend.def
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ WARNING(warning_inferred_simulator_target,none,
ERROR(error_argument_not_allowed_with, none,
"argument '%0' is not allowed with '%1'", (StringRef, StringRef))

WARNING(warning_argument_not_supported_with_optimization, none,
"argument '%0' is not supported with optimization", (StringRef))

ERROR(error_option_requires_sanitizer, none,
"option '%0' requires a sanitizer to be enabled. Use -sanitize= to "
"enable a sanitizer", (StringRef))
Expand Down Expand Up @@ -107,8 +104,6 @@ WARNING(warning_cannot_multithread_batch_mode,none,
"ignoring -num-threads argument; cannot multithread batch mode", ())
ERROR(error_cannot_explicit_interface_build_in_mode,none,
"'-explicit-interface-module-build' only supported when building a module from interface ('-compile-module-from-interface' or '-typecheck-module-from-interface')'", ())
ERROR(error_cannot_direct_cc1_pcm_build_in_mode,none,
"'-direct-clang-cc1-module-build' only supported when building a PCM ('-emit-pcm')'", ())
ERROR(error_unsupported_option_argument,none,
"unsupported argument '%1' to option '%0'", (StringRef, StringRef))
ERROR(error_swift_module_file_requires_delimeter,none,
Expand All @@ -122,8 +117,6 @@ ERROR(error_immediate_mode_primary_file,none,
"immediate mode is incompatible with -primary-file", ())
ERROR(error_missing_frontend_action,none,
"no frontend action was selected", ())
ERROR(error_unsupported_frontend_action, none,
"unsupported action: %0", (StringRef))
ERROR(error_invalid_source_location_str,none,
"invalid source location string '%0'", (StringRef))
ERROR(error_no_source_location_scope_map,none,
Expand Down Expand Up @@ -258,10 +251,6 @@ ERROR(error_cannot_have_supplementary_outputs,none,
ERROR(error_duplicate_input_file,none,
"duplicate input file '%0'", (StringRef))

ERROR(repl_must_be_initialized,none,
"variables currently must have an initial value when entered at the "
"top level of the REPL", ())

ERROR(verify_encountered_fatal,none,
"fatal error encountered while in -verify mode", ())

Expand Down Expand Up @@ -431,8 +420,6 @@ ERROR(unsupported_version_of_module_interface,none,
(StringRef, llvm::VersionTuple))
ERROR(error_opening_explicit_module_file,none,
"failed to open explicit Swift module: %0", (StringRef))
ERROR(error_extracting_flags_from_module_interface,none,
"error extracting flags from module interface", ())
WARNING(warning_module_shadowing_may_break_module_interface,none,
"public %0 %1 shadows module %2, which may cause failures when "
"importing %3 or its clients in some configurations; please rename "
Expand Down
3 changes: 0 additions & 3 deletions include/swift/AST/DiagnosticsIRGen.def
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ ERROR(alignment_more_than_maximum,none,
"@_alignment cannot increase alignment above maximum alignment of %0",
(unsigned))

ERROR(raw_layout_dynamic_type_layout_unsupported,none,
"@_rawLayout is not yet supported for layouts dependent on generic types", ())

ERROR(temporary_allocation_size_negative,none,
"allocation capacity must be greater than or equal to zero", ())
ERROR(temporary_allocation_size_overflow,none,
Expand Down
42 changes: 0 additions & 42 deletions include/swift/AST/DiagnosticsParse.def
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,6 @@ ERROR(observing_accessor_in_subscript,none,
ERROR(getset_cannot_be_implied,none,
"variable with implied type cannot have implied getter/setter", ())

ERROR(init_accessor_expected_name,none,
"expected property name in init accessor effect", ())

// Import
ERROR(decl_expected_module_name,none,
"expected module name in import declaration", ())
Expand Down Expand Up @@ -673,8 +670,6 @@ ERROR(sil_keypath_index_operand_type_conflict,none,
ERROR(sil_keypath_no_use_of_operand_in_pattern,none,
"operand %0 is not referenced by any component in the pattern",
(unsigned))
ERROR(sil_movevalue_invalid_optional_attribute,none,
"Optional attribute '[%0]' can not be applied to move_value", (StringRef))
ERROR(sil_markmustcheck_invalid_attribute,none,
"Attribute '[%0]' can not be applied to mark_value_as_moveonly", (StringRef))
ERROR(sil_markmustcheck_requires_attribute,none,
Expand Down Expand Up @@ -736,8 +731,6 @@ ERROR(sil_vtable_expect_rsquare,none,
"expected ']' after vtable entry kind", ())

// SIL MoveOnlyDeinit
ERROR(expected_sil_moveonlydeinit_colon,none,
"expected ':' in a MoveOnlyDeinit entry", ())
ERROR(sil_moveonlydeinit_func_not_found,none,
"sil function not found %0", (Identifier))
ERROR(sil_moveonlydeinit_nominal_not_found,none,
Expand Down Expand Up @@ -1364,19 +1357,13 @@ ERROR(expected_rsquare_array_expr,PointsToFirstBadToken,
ERROR(expected_arg_list_in_object_literal,PointsToFirstBadToken,
"expected argument list in object literal", ())

// Unknown pound expression.
ERROR(unknown_pound_expr,none,
"use of unknown directive '#%0'", (StringRef))

// Ternary expressions
ERROR(expected_expr_after_ternary_question,none,
"expected expression after '?' in ternary expression", ())
ERROR(expected_colon_after_ternary_question,none,
"expected ':' after '? ...' in ternary expression", ())
ERROR(expected_expr_after_ternary_colon,none,
"expected expression after '? ... :' in ternary expression", ())
ERROR(expected_expr_after_try, none,
"expected expression after 'try'", ())
ERROR(expected_expr_after_await, none,
"expected expression after 'await'", ())
ERROR(expected_expr_after_move, none,
Expand Down Expand Up @@ -1492,9 +1479,6 @@ WARNING(warning_in_effects_attribute,none,
ERROR(expected_in_attribute_list,none,
"expected ']' or ',' in attribute list", ())

ERROR(expected_depends_on,none,
"expected 'depends_on'", ())

ERROR(type_attribute_applied_to_decl,none,
"attribute can only be applied to types, not declarations", ())
ERROR(decl_attribute_applied_to_type,none,
Expand Down Expand Up @@ -1522,9 +1506,6 @@ ERROR(attr_expected_comma,none,
ERROR(attr_expected_string_literal,none,
"expected string literal in '%0' attribute", (StringRef))

ERROR(attr_expected_integer_literal,none,
"expected integer literal in '%0' attribute", (StringRef))

ERROR(attr_expected_option_such_as,none,
"expected '%0' option such as '%1'", (StringRef, StringRef))

Expand Down Expand Up @@ -1782,8 +1763,6 @@ ERROR(attr_differentiable_kind_not_supported,PointsToFirstBadToken,
"unsupported differentiability kind '%0'; only 'reverse' is supported", (StringRef))
ERROR(attr_differentiable_unknown_kind,PointsToFirstBadToken,
"unknown differentiability kind '%0'; only 'reverse' is supported", (StringRef))
ERROR(attr_differentiable_expected_parameter_list,PointsToFirstBadToken,
"expected a list of parameters to differentiate with respect to", ())
ERROR(attr_differentiable_use_wrt_not_withrespectto,none,
"use 'wrt:' to specify parameters to differentiate with respect to", ())
ERROR(attr_differentiable_expected_label,none,
Expand Down Expand Up @@ -1833,10 +1812,6 @@ ERROR(sil_inst_autodiff_expected_function_type_operand,PointsToFirstBadToken,
ERROR(sil_inst_autodiff_expected_differentiability_witness_kind,PointsToFirstBadToken,
"expected a differentiability witness kind, which can be one of '[jvp]', "
"'[vjp]', or '[transpose]'", ())
ERROR(sil_inst_autodiff_invalid_witness_generic_signature,PointsToFirstBadToken,
"expected witness_generic signature '%0' does not have same generic "
"parameters as original function generic signature '%1'",
(StringRef, StringRef))

WARNING(warn_attr_unsafe_removed,none,
"'%0' attribute has been removed in favor of @preconcurrency",
Expand Down Expand Up @@ -2069,23 +2044,6 @@ ERROR(associatedtype_cannot_be_variadic,none,
ERROR(type_parameter_pack_ellipsis,none,
"ellipsis operator cannot be used with a type parameter pack", ())

//------------------------------------------------------------------------------
// MARK: syntax parsing diagnostics
//------------------------------------------------------------------------------
ERROR(unknown_syntax_entity, PointsToFirstBadToken,
"unknown %0 syntax exists in the source", (StringRef))

//------------------------------------------------------------------------------
// MARK: multiple trailing closures diagnostics
//------------------------------------------------------------------------------
ERROR(expected_argument_label_followed_by_closure_literal,none,
"expected an argument label followed by a closure literal", ())
ERROR(expected_closure_literal,none,
"expected a closure literal", ())

ERROR(expected_multiple_closures_block_rbrace,none,
"expected '}' at the end of a trailing closures block", ())

//------------------------------------------------------------------------------
// MARK: macros
//------------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions include/swift/AST/DiagnosticsRefactoring.def
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,12 @@ ERROR(invalid_name, none, "'%0' is not a valid name", (StringRef))

ERROR(extract_function_not_supported_swiftsyntax_missing, none, "Extract Function is not supported because sourcekitd was built without swift-syntax", ())

ERROR(invalid_location, none, "given location is not valid", ())

ERROR(arity_mismatch, none, "the given new name '%0' does not match the arity of the old name '%1'", (StringRef, StringRef))

ERROR(name_not_functionlike, none, "the 'call' name usage cannot be used with a non-function-like name '%0'", (StringRef))

ERROR(unresolved_location, none, "cannot rename due to unresolved location", ())

ERROR(location_module_mismatch, none, "given location does not belong to module '%0'", (StringRef))

ERROR(value_decl_no_loc, none, "cannot rename %0 as it has no declaration location", (DeclName))

ERROR(decl_is_system_symbol, none, "cannot rename system symbol %0", (DeclName))
Expand Down
18 changes: 0 additions & 18 deletions include/swift/AST/DiagnosticsSIL.def
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,6 @@ NOTE(autodiff_member_subset_indices_not_differentiable,none,
NOTE(autodiff_cannot_param_subset_thunk_partially_applied_orig_fn,none,
"cannot convert a direct method reference to a '@differentiable' "
"function; use an explicit closure instead", ())
NOTE(autodiff_cannot_differentiate_through_multiple_results,none,
"cannot differentiate through multiple results", ())
NOTE(autodiff_cannot_differentiate_through_inout_arguments,none,
"cannot differentiate through 'inout' arguments", ())
NOTE(autodiff_cannot_differentiate_through_direct_yield,none,
"cannot differentiate through a '_read' accessor", ())
NOTE(autodiff_enums_unsupported,none,
Expand Down Expand Up @@ -796,14 +792,6 @@ NOTE(capturepromotion_concurrentcapture_capturinguse_here, none,
NOTE(capturepromotion_variable_defined_here,none,
"variable defined here", ())

// move operator used on generic or evalue
ERROR(move_operator_used_on_generic_or_existential_value, none,
"move() used on a generic or existential value", ())

// copy operator used on generic or evalue
ERROR(copy_operator_used_on_generic_or_existential_value, none,
"copy() used on a generic or existential value", ())

// noimplicitcopy on generic or existential binding
ERROR(noimplicitcopy_used_on_generic_or_existential, none,
"@_noImplicitCopy can not be used on a generic or existential typed "
Expand Down Expand Up @@ -976,12 +964,6 @@ ERROR(regionbasedisolation_arg_transferred, none,
ERROR(regionbasedisolation_arg_passed_to_strongly_transferred_param, none,
"%0 value of type %1 passed as a strongly transferred parameter; later accesses could race",
(StringRef, Type))
NOTE(regionbasedisolation_isolated_since_in_same_region_basename, none,
"value is %0 since it is in the same region as %1",
(StringRef, DeclBaseName))
NOTE(regionbasedisolation_isolated_since_in_same_region_string, none,
"%0 is %1since it is in the same region as %2",
(Identifier, StringRef, Identifier))

//===---
// New Transfer Non Sendable Diagnostics
Expand Down
Loading