mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
As an example of how this is useful, consider the case where ClangImporter fails with "unexpected error produced: could not build C module 'ctypes'" It would be useful to know what the underlying Clang error was that caused building the module to fail, but so far, `-verify` mode would not output that; to get the error, it would be necessary to run the compiler invocation again without `-verify`. This change causes any remaining diagnostics that weren't in the input file to be output if there were unexpected diagnostics in `-verify` mode. I haven't added any tests for this because I didn't find a place that contains tests for the `-verify` functionality itself (as opposed to tests that use `-verify` mode). I think the large number of tests that run with `-verify` should at least ensure, however, that this change does not regress anything.