Skip to content

Commit d4a0ccd

Browse files
authored
Merge pull request swiftlang#38586 from apple/sourceinfo-warning
[Diagnostics] Reword malformed swiftsourceinfo diagnostic
2 parents b4f72d0 + 3ba8cb2 commit d4a0ccd

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
@@ -812,7 +812,9 @@ ERROR(serialization_allowing_error_type,none,
812812
"allowing deserialization of error type '%0' in module '%1'",
813813
(StringRef, StringRef))
814814
WARNING(serialization_malformed_sourceinfo,none,
815-
"unable to use malformed module source info '%0'", (StringRef))
815+
"'%0' is either malformed or generated by a different Swift version. "
816+
"Note that it uses an unstable format and may leak internal project "
817+
"details, it should not be distributed alongside modules", (StringRef))
816818

817819
ERROR(reserved_member_name,none,
818820
"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)