mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The serialized diagnostics reader has one very specific limitation it places on filenames: they must not end in `/`, because that makes them look like a directory. This is not documented, and the diagnostics reader will unceremoniously crash when trying to read such a file. While the reader should be fixed to at least fail gracefully in such cases, Swift also shouldn't generate such filenames. Right now, they can be generated when referencing an entity named `/` that is synthesized or comes from a module. When we encounter such file names, append `_operator` to avoid the problem. Fixes rdar://118217560.