swift
47b068d4 - [Serialization] Emit an error on deserializing an invalid declaration

Commit
5 years ago
[Serialization] Emit an error on deserializing an invalid declaration When running in the allow errors mode (-experimental-allow-module-with-compiler-errors), modules may contain invalid declarations. The rest of the compiler pipeline, however, expects to have valid declarations unless diagnostics have emitted an error. Emit an error while deserializing to maintain this assumption. Note that these errors will not have a useful location, unless there's a corresponding `.swiftsourceinfo`. This isn't a problem for the intended use case in IDEs, where diagnostics outside the current file would be ignored anyway. Since reading declarations is lazy, SILGen (and thus SIL diagnostics) can still run as long as any invalid declarations weren't referenced in the compiling module. Resolves rdar://74325388
Author
Committer
Parents
Loading