Skip to content

Commit d3429d1

Browse files
authored
Merge pull request swiftlang#38587 from apple/cherry-rdar80785874
[5.5][Diagnostics] Reword malformed swiftsourceinfo diagnostic
2 parents b2b8f77 + c08e914 commit d3429d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,9 @@ ERROR(serialization_allowing_error_type,none,
806806
"allowing deserialization of error type '%0' in module '%1'",
807807
(StringRef, StringRef))
808808
WARNING(serialization_malformed_sourceinfo,none,
809-
"unable to use malformed module source info '%0'", (StringRef))
809+
"'%0' is either malformed or generated by a different Swift version. "
810+
"Note that it uses an unstable format and may leak internal project "
811+
"details, it should not be distributed alongside modules", (StringRef))
810812

811813
ERROR(reserved_member_name,none,
812814
"type member must not be named %0, since it would conflict with the"

test/Serialization/load-invalid-sourceinfo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
// RUN: echo -n 'abcde' > %t/empty.swiftsourceinfo
1515
// RUN: %target-swift-frontend -typecheck -I %t %s -verify
1616

17-
import empty // expected-warning{{unable to use malformed module source info}}
17+
import empty // expected-warning{{is either malformed or generated by a different Swift version}}

0 commit comments

Comments
 (0)