-
Notifications
You must be signed in to change notification settings - Fork 10.5k
ConformanceChecker: Minor diagnostics QoI improvements #41074
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 smoke test |
e94debd
to
2b0cd82
Compare
@swift-ci please smoke test |
2b0cd82
to
753cef8
Compare
@swift-ci please smoke test macOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of splitting off diagnostics from checkGenericArguments()!
lib/Sema/TypeChecker.h
Outdated
/// Return the result of checking the given generic parameter substitutions | ||
/// against the given requirements. | ||
CheckGenericArgumentsResult | ||
checkGenericArgumentsInformative(ModuleDecl *module, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something more like checkAndDiagnoseGenericArguments()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then how about checkGenericArgumentsAndDiagnose
, or checkGenericArgumentsForDiagnostics
? I think these versions make for a slightly better hint that the function returns data for diagnostics rather than performing them in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with checkGenericArgumentsAndDiagnose
checkGenericArgumentsForDiagnostics
.
753cef8
to
6944566
Compare
@swift-ci please smoke test macOS |
6944566
to
bbcae86
Compare
@slavapestov Addressed all your comments; could you have another look? Thanks in advance. |
bbcae86
to
0cb1ec4
Compare
0cb1ec4
to
03c095d
Compare
@swift-ci please smoke test |
@slavapestov ping |
03c095d
to
b301a78
Compare
@swift-ci please smoke test |
@slavapestov ping |
@swift-ci please smoke test |
…checkGenericArguments'
…-of-place diagnostics
…enericArguments' into a dedicated routine
…heckGenericArgumentsForDiagnostics'
…ce it closer to its sole client
…irement check fails in 'ensureRequirementsAreSatisfied'
b301a78
to
ba7f301
Compare
@swift-ci please smoke test |
@slavapestov Thanks! |
This fixes a few issues with
ensureRequirementsAreSatisfied
:checkGenericArguments
and requirement failure diagnosis allows for emitting the conformance failure before we diagnose the requirement failure).The location for the failed requirement specification note was off.