Skip to content
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 @@ -219,9 +219,6 @@ NOTE(scanner_find_cycle_swift_overlay_path, none,
NOTE(scanner_cycle_source_target_shadow_module, none,
"source target '%0' shadowing a%select{ |n SDK }2Swift module with the same name at: '%1'", (StringRef, StringRef, bool))

ERROR(scanner_arguments_invalid, none,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: 41e4712

"dependencies scanner cannot be configured with arguments: '%0'", (StringRef))

ERROR(error_scanner_extra, none,
"failed inside dependency scanner: '%0'", (StringRef))

Expand Down
23 changes: 0 additions & 23 deletions include/swift/AST/DiagnosticsFrontend.def
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ ERROR(error_unknown_library_level, none,
"unknown library level '%0', "
"expected one of 'api', 'spi', 'ipi', or 'other'", (StringRef))

ERROR(error_old_spi_only_import_unsupported, none,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: 9e93b7b

"'-experimental-spi-imports' is unsupported in Swift 6, "
"use '@_spiOnly' instead",
())

ERROR(error_unknown_require_explicit_availability, none,
"unknown argument '%0', passed to -require-explicit-availability, "
"expected 'error', 'warn' or 'ignore'",
Expand Down Expand Up @@ -305,27 +300,10 @@ REMARK(remark_indexing_system_module,none,
"%select{|; skipping because of a broken swiftinterface}1",
(StringRef, bool))

ERROR(error_create_symbolic_interfaces_dir,none,
"creating symbolic interfaces directory: %0", (StringRef))
ERROR(error_symbolic_interfaces_failed_status_check,none,
"failed file status check: %0", (StringRef))
ERROR(error_write_symbolic_interface,none,
"writing symbolic interface file: %0", (StringRef))
REMARK(remark_emitting_symbolic_interface_module,none,
Comment on lines -308 to -314
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last uses: b51cfa5

"emitting symbolic interface at %0"
"%select{|; skipping because it's up to date}1",
(StringRef, bool))

ERROR(error_wrong_number_of_arguments,none,
"wrong number of '%0' arguments (expected %1, got %2)",
(StringRef, int, int))

ERROR(error_formatting_multiple_file_ranges,none,
"file ranges don't support multiple input files", ())

ERROR(error_formatting_invalid_range,none,
"file range is invalid", ())
Comment on lines -323 to -327
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: 6443619


WARNING(stats_disabled,none,
"compiler was not built with support for collecting statistics", ())

Expand Down Expand Up @@ -517,7 +495,6 @@ REMARK(matching_output_produced,none,
// Caching related diagnostics
GROUPED_ERROR(error_caching_no_cas_fs, CompilationCaching, none,
"caching is enabled without CAS file-system options, input is not immutable", ())
ERROR(error_prefix_mapping, none, "cannot create scanner prefix mapping: '%0'", (StringRef))
Copy link
Contributor Author

@jamieQ jamieQ Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: 0384347

  • TODO: verify removal – cc @sina-mahdavi could you confirm whether it is expected that this is unused please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edit: looks like the error was introduced here, but the error handling function it was for (llvm::MappedPrefix::transformJoined) is no longer used, so seems reasonable to remove.


REMARK(replay_output, none, "replay output file '%0': key '%1'", (StringRef, StringRef))
REMARK(output_cache_miss, none, "cache miss for input file '%0': key '%1'", (StringRef, StringRef))
Expand Down
4 changes: 0 additions & 4 deletions include/swift/AST/DiagnosticsParse.def
Original file line number Diff line number Diff line change
Expand Up @@ -1752,8 +1752,6 @@ ERROR(opened_attribute_expected_rparen,none,
// pack_element
ERROR(pack_element_attribute_expected_lparen,none,
"expected '(' after 'pack_element' attribute", ())
ERROR(pack_element_attribute_expected_rparen,none,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: c491d25

"expected ')' after id value for 'pack_element' attribute", ())
ERROR(multiple_open_pack_element,none,
"multiple 'open_pack_element' instructions with same UUID", ())
ERROR(opened_shape_class_not_pack_param,none,
Expand Down Expand Up @@ -1837,8 +1835,6 @@ ERROR(sil_autodiff_expected_lsquare,PointsToFirstBadToken,
"expected '[' to start the %0", (StringRef))
ERROR(sil_autodiff_expected_rsquare,PointsToFirstBadToken,
"expected ']' to complete the %0", (StringRef))
ERROR(sil_autodiff_expected_index_list,PointsToFirstBadToken,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: 3544404

"expected a space-separated list of indices, e.g. '0 1'", ())
ERROR(sil_autodiff_expected_index_list_label,PointsToFirstBadToken,
"expected label '%0' in index list", (StringRef))
ERROR(sil_autodiff_expected_parameter_index,PointsToFirstBadToken,
Expand Down
22 changes: 0 additions & 22 deletions include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,6 @@ ERROR(expr_keypath_mutating_getter,none,
"%select{key path|dynamic key path member lookup}1 cannot refer to %0, "
"which has a mutating getter",
(const ValueDecl *, bool))
ERROR(expr_keypath_static_member,none,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: e68e4ea

"%select{key path|dynamic key path member lookup}1 cannot refer to static member %0",
(const ValueDecl *, bool))
ERROR(keypath_static_member_access_from_unsupported_module,none,
"%select{key path|dynamic key path member lookup}3 cannot refer "
"to static member %1 of type %0 from module %2",
Expand Down Expand Up @@ -1318,10 +1315,6 @@ REMARK(transitive_dependency_behavior,none,
"%1 has %select{a required|an optional|an ignored}2 "
"transitive dependency on '%0'",
(StringRef, Identifier, unsigned))

REMARK(explicit_interface_build_skipped,none,
Copy link
Contributor Author

@jamieQ jamieQ Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: 4cdbcb8

  • TODO: verify removal

"Skipped rebuilding module at %0 - up-to-date",
(StringRef))

GROUPED_WARNING(cannot_find_module_version,ModuleVersionMissing,none,
"cannot find user version number for%select{| Clang}1 module '%0';"
Expand Down Expand Up @@ -2223,8 +2216,6 @@ ERROR(expose_protocol_to_cxx_unsupported,none,
"protocol %0 can not yet be represented in C++", (ValueDecl *))
ERROR(expose_move_only_to_cxx,none,
"noncopyable %kind0 can not yet be represented in C++", (ValueDecl *))
ERROR(expose_nested_type_to_cxx,none,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: 8603dfe

"nested %kind0 can not yet be represented in C++", (ValueDecl *))
ERROR(expose_macro_to_cxx,none,
"Swift macro can not yet be represented in C++", (ValueDecl *))
GROUPED_WARNING(warn_unannotated_cxx_func_returning_frt, ForeignReferenceType, none,
Expand Down Expand Up @@ -5984,11 +5975,6 @@ ERROR(non_sendable_result_in_objc,none,
"actor boundary",
(Type, const ValueDecl *, ActorIsolation))

ERROR(non_sendable_call_result_type,none,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: cff835e

"non-Sendable result type %0 cannot be sent from %1 context in call "
"to async function",
(Type, ActorIsolation))

ERROR(non_sendable_property_exits_actor,none,
"non-Sendable type %0 of %kind1 cannot exit %2 context",
(Type, const ValueDecl *, ActorIsolation))
Expand Down Expand Up @@ -6408,9 +6394,6 @@ ERROR(invalid_ownership_with_optional,none,
ERROR(invalid_ownership_not_optional,none,
"%0 variable should have optional type %1",
(ReferenceOwnership, Type))
ERROR(invalid_ownership_is_let,none,
Copy link
Contributor Author

@jamieQ jamieQ Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: 89f8f8b

  • TODO: verify removal – cc @nickolas-pohilets i see this was recently(ish) removed for the 'weak let' feature, rather than becoming conditional on the presence of that feature itself; is that expected/intentional?

Copy link
Contributor Author

@jamieQ jamieQ Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edit: upon further inspection, i think this was the desired behavior – weak let is now unconditionally supported, but the mutability of weak captures is the thing controlled via the upcoming feature flag. thus, the error is no longer applicable. do correct me if i'm mistaken.

"%0 must be a mutable variable, because it may change at runtime",
(ReferenceOwnership))
ERROR(ownership_invalid_in_protocols,none,
"%0 cannot be applied to a property declaration in a protocol",
(ReferenceOwnership))
Expand Down Expand Up @@ -8329,11 +8312,6 @@ ERROR(noimplicitcopy_attr_valid_only_on_local_let_params,
none, "'@_noImplicitCopy' attribute can only be applied to local lets and params", ())
ERROR(noimplicitcopy_attr_not_allowed_on_moveonlytype,none,
"'@_noImplicitCopy' has no effect when applied to a noncopyable type", ())
ERROR(noncopyable_types_cannot_be_resilient, none,
Copy link
Contributor Author

@jamieQ jamieQ Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last use: 7dbab5e

  • TODO: verify missing use is not a bug (SE-390 obviates this)

"noncopyable %kind0 must be '@frozen' in library evolution mode; "
"non-'@frozen' public and '@usableFromInline' noncopyable types are not "
"supported",
(const ValueDecl *))
ERROR(noncopyable_cannot_have_read_set_accessor,none,
"noncopyable %select{variable|subscript}0 cannot provide a read and set accessor",
(unsigned))
Expand Down