Skip to content

Sema: clean some unnecessary delayed diagnosis emits. #8001

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

Merged
merged 1 commit into from
Mar 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions lib/Sema/TypeCheckProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1957,16 +1957,8 @@ namespace {

case ProtocolConformanceState::CheckingTypeWitnesses:
case ProtocolConformanceState::Checking:
// Nothing to do.
return conformance;

case ProtocolConformanceState::Complete:
if (conformance->isInvalid()) {
// Emit any delayed diagnostics and return.
// FIXME: Should we complete checking to emit more diagnostics?
ConformanceChecker(TC, conformance, MissingWitnesses, false).
emitDelayedDiags();
}
// Nothing to do.
return conformance;
}

Expand Down Expand Up @@ -4866,8 +4858,6 @@ void ConformanceChecker::checkConformance(MissingWitnessDiagnosisKind Kind) {
// FIXME: Caller checks that this type conforms to all of the
// inherited protocols.

emitDelayedDiags();

// Resolve all of the type witnesses.
resolveTypeWitnesses();

Expand Down