-
Notifications
You must be signed in to change notification settings - Fork 10.5k
If -verify
mode saw unexpected diagnostics, print diagnostics from all files.
#30028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci Please test |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test |
…all files. 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.
A header shouldn't contain a function body unless the function is inline. Following gribozavr's suggestion, I'm using the easier solution of omitting the semicolon from the function prototype. (In response to review comments.)
Shorten expected error message so that it doesn't expect "C module" (and breaks if presented with "Objective-C module").
Pushed a rebase to get off a bad version with failing LLDB tests. Please retest. |
@swift-ci Please test |
Build failed |
@swift-ci Please test Linux |
This PR causes any remaining diagnostics that weren't in the input file to be output if there were unexpected diagnostics in
-verify
mode.As an example of how this is useful, consider the case where ClangImporter fails with
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
.The PR adds a test that exercises this use case.
I'm also adding some basic tests for the
-verify
functionality generally, which didn't seem to exist.