Skip to content

Commit d1529b5

Browse files
authored
Merge pull request #85282 from jamieQ/dead-diags
[NFC][Diagnostics]: remove a number of unused diagnostics
2 parents 893340d + c2a42e2 commit d1529b5

File tree

4 files changed

+0
-52
lines changed

4 files changed

+0
-52
lines changed

include/swift/AST/DiagnosticsCommon.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,6 @@ NOTE(scanner_find_cycle_swift_overlay_path, none,
219219
NOTE(scanner_cycle_source_target_shadow_module, none,
220220
"source target '%0' shadowing a%select{ |n SDK }2Swift module with the same name at: '%1'", (StringRef, StringRef, bool))
221221

222-
ERROR(scanner_arguments_invalid, none,
223-
"dependencies scanner cannot be configured with arguments: '%0'", (StringRef))
224-
225222
ERROR(error_scanner_extra, none,
226223
"failed inside dependency scanner: '%0'", (StringRef))
227224

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ ERROR(error_unknown_library_level, none,
6868
"unknown library level '%0', "
6969
"expected one of 'api', 'spi', 'ipi', or 'other'", (StringRef))
7070

71-
ERROR(error_old_spi_only_import_unsupported, none,
72-
"'-experimental-spi-imports' is unsupported in Swift 6, "
73-
"use '@_spiOnly' instead",
74-
())
75-
7671
ERROR(error_unknown_require_explicit_availability, none,
7772
"unknown argument '%0', passed to -require-explicit-availability, "
7873
"expected 'error', 'warn' or 'ignore'",
@@ -305,27 +300,10 @@ REMARK(remark_indexing_system_module,none,
305300
"%select{|; skipping because of a broken swiftinterface}1",
306301
(StringRef, bool))
307302

308-
ERROR(error_create_symbolic_interfaces_dir,none,
309-
"creating symbolic interfaces directory: %0", (StringRef))
310-
ERROR(error_symbolic_interfaces_failed_status_check,none,
311-
"failed file status check: %0", (StringRef))
312-
ERROR(error_write_symbolic_interface,none,
313-
"writing symbolic interface file: %0", (StringRef))
314-
REMARK(remark_emitting_symbolic_interface_module,none,
315-
"emitting symbolic interface at %0"
316-
"%select{|; skipping because it's up to date}1",
317-
(StringRef, bool))
318-
319303
ERROR(error_wrong_number_of_arguments,none,
320304
"wrong number of '%0' arguments (expected %1, got %2)",
321305
(StringRef, int, int))
322306

323-
ERROR(error_formatting_multiple_file_ranges,none,
324-
"file ranges don't support multiple input files", ())
325-
326-
ERROR(error_formatting_invalid_range,none,
327-
"file range is invalid", ())
328-
329307
WARNING(stats_disabled,none,
330308
"compiler was not built with support for collecting statistics", ())
331309

@@ -517,7 +495,6 @@ REMARK(matching_output_produced,none,
517495
// Caching related diagnostics
518496
GROUPED_ERROR(error_caching_no_cas_fs, CompilationCaching, none,
519497
"caching is enabled without CAS file-system options, input is not immutable", ())
520-
ERROR(error_prefix_mapping, none, "cannot create scanner prefix mapping: '%0'", (StringRef))
521498

522499
REMARK(replay_output, none, "replay output file '%0': key '%1'", (StringRef, StringRef))
523500
REMARK(output_cache_miss, none, "cache miss for input file '%0': key '%1'", (StringRef, StringRef))

include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,8 +1752,6 @@ ERROR(opened_attribute_expected_rparen,none,
17521752
// pack_element
17531753
ERROR(pack_element_attribute_expected_lparen,none,
17541754
"expected '(' after 'pack_element' attribute", ())
1755-
ERROR(pack_element_attribute_expected_rparen,none,
1756-
"expected ')' after id value for 'pack_element' attribute", ())
17571755
ERROR(multiple_open_pack_element,none,
17581756
"multiple 'open_pack_element' instructions with same UUID", ())
17591757
ERROR(opened_shape_class_not_pack_param,none,
@@ -1837,8 +1835,6 @@ ERROR(sil_autodiff_expected_lsquare,PointsToFirstBadToken,
18371835
"expected '[' to start the %0", (StringRef))
18381836
ERROR(sil_autodiff_expected_rsquare,PointsToFirstBadToken,
18391837
"expected ']' to complete the %0", (StringRef))
1840-
ERROR(sil_autodiff_expected_index_list,PointsToFirstBadToken,
1841-
"expected a space-separated list of indices, e.g. '0 1'", ())
18421838
ERROR(sil_autodiff_expected_index_list_label,PointsToFirstBadToken,
18431839
"expected label '%0' in index list", (StringRef))
18441840
ERROR(sil_autodiff_expected_parameter_index,PointsToFirstBadToken,

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,6 @@ ERROR(expr_keypath_mutating_getter,none,
686686
"%select{key path|dynamic key path member lookup}1 cannot refer to %0, "
687687
"which has a mutating getter",
688688
(const ValueDecl *, bool))
689-
ERROR(expr_keypath_static_member,none,
690-
"%select{key path|dynamic key path member lookup}1 cannot refer to static member %0",
691-
(const ValueDecl *, bool))
692689
ERROR(keypath_static_member_access_from_unsupported_module,none,
693690
"%select{key path|dynamic key path member lookup}3 cannot refer "
694691
"to static member %1 of type %0 from module %2",
@@ -1318,10 +1315,6 @@ REMARK(transitive_dependency_behavior,none,
13181315
"%1 has %select{a required|an optional|an ignored}2 "
13191316
"transitive dependency on '%0'",
13201317
(StringRef, Identifier, unsigned))
1321-
1322-
REMARK(explicit_interface_build_skipped,none,
1323-
"Skipped rebuilding module at %0 - up-to-date",
1324-
(StringRef))
13251318

13261319
GROUPED_WARNING(cannot_find_module_version,ModuleVersionMissing,none,
13271320
"cannot find user version number for%select{| Clang}1 module '%0';"
@@ -2223,8 +2216,6 @@ ERROR(expose_protocol_to_cxx_unsupported,none,
22232216
"protocol %0 can not yet be represented in C++", (ValueDecl *))
22242217
ERROR(expose_move_only_to_cxx,none,
22252218
"noncopyable %kind0 can not yet be represented in C++", (ValueDecl *))
2226-
ERROR(expose_nested_type_to_cxx,none,
2227-
"nested %kind0 can not yet be represented in C++", (ValueDecl *))
22282219
ERROR(expose_macro_to_cxx,none,
22292220
"Swift macro can not yet be represented in C++", (ValueDecl *))
22302221
GROUPED_WARNING(warn_unannotated_cxx_func_returning_frt, ForeignReferenceType, none,
@@ -5986,11 +5977,6 @@ ERROR(non_sendable_result_in_objc,none,
59865977
"actor boundary",
59875978
(Type, const ValueDecl *, ActorIsolation))
59885979

5989-
ERROR(non_sendable_call_result_type,none,
5990-
"non-Sendable result type %0 cannot be sent from %1 context in call "
5991-
"to async function",
5992-
(Type, ActorIsolation))
5993-
59945980
ERROR(non_sendable_property_exits_actor,none,
59955981
"non-Sendable type %0 of %kind1 cannot exit %2 context",
59965982
(Type, const ValueDecl *, ActorIsolation))
@@ -6410,9 +6396,6 @@ ERROR(invalid_ownership_with_optional,none,
64106396
ERROR(invalid_ownership_not_optional,none,
64116397
"%0 variable should have optional type %1",
64126398
(ReferenceOwnership, Type))
6413-
ERROR(invalid_ownership_is_let,none,
6414-
"%0 must be a mutable variable, because it may change at runtime",
6415-
(ReferenceOwnership))
64166399
ERROR(ownership_invalid_in_protocols,none,
64176400
"%0 cannot be applied to a property declaration in a protocol",
64186401
(ReferenceOwnership))
@@ -8331,11 +8314,6 @@ ERROR(noimplicitcopy_attr_valid_only_on_local_let_params,
83318314
none, "'@_noImplicitCopy' attribute can only be applied to local lets and params", ())
83328315
ERROR(noimplicitcopy_attr_not_allowed_on_moveonlytype,none,
83338316
"'@_noImplicitCopy' has no effect when applied to a noncopyable type", ())
8334-
ERROR(noncopyable_types_cannot_be_resilient, none,
8335-
"noncopyable %kind0 must be '@frozen' in library evolution mode; "
8336-
"non-'@frozen' public and '@usableFromInline' noncopyable types are not "
8337-
"supported",
8338-
(const ValueDecl *))
83398317
ERROR(noncopyable_cannot_have_read_set_accessor,none,
83408318
"noncopyable %select{variable|subscript}0 cannot provide a read and set accessor",
83418319
(unsigned))

0 commit comments

Comments
 (0)