[Diagnostics] Reword malformed swiftsourceinfo diagnostic

The original wording is not helpful to a user if they don't know what a
swiftsourceinfo actually is. Change the wording to provide some more
context, ie. that it is an unstable format and should not be
distributed.

Resolves rdar://80785874
This commit is contained in:
Ben Barham
2021-07-23 08:47:02 +10:00
parent 0cb305c756
commit 3ba8cb22f6
2 changed files with 4 additions and 2 deletions

View File

@@ -812,7 +812,9 @@ ERROR(serialization_allowing_error_type,none,
"allowing deserialization of error type '%0' in module '%1'",
(StringRef, StringRef))
WARNING(serialization_malformed_sourceinfo,none,
"unable to use malformed module source info '%0'", (StringRef))
"'%0' is either malformed or generated by a different Swift version. "
"Note that it uses an unstable format and may leak internal project "
"details, it should not be distributed alongside modules", (StringRef))
ERROR(reserved_member_name,none,
"type member must not be named %0, since it would conflict with the"

View File

@@ -14,4 +14,4 @@
// RUN: echo -n 'abcde' > %t/empty.swiftsourceinfo
// RUN: %target-swift-frontend -typecheck -I %t %s -verify
import empty // expected-warning{{unable to use malformed module source info}}
import empty // expected-warning{{is either malformed or generated by a different Swift version}}