Skip to content

Commit fe00f87

Browse files
committed
AST: Tweak ASTContext::hadError()
1 parent b1439c1 commit fe00f87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ void ASTContext::addCleanup(std::function<void(void)> cleanup) {
18651865
}
18661866

18671867
bool ASTContext::hadError() const {
1868-
return Diags.hadAnyError();
1868+
return Diags.hadAnyError() || hasDelayedConformanceErrors();
18691869
}
18701870

18711871
/// Retrieve the arena from which we should allocate storage for a type.

lib/Sema/ConstraintSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7235,7 +7235,7 @@ void ConstraintSystem::maybeProduceFallbackDiagnostic(
72357235
// diagnostics already emitted or waiting to be emitted. Because they are
72367236
// a better indication of the problem.
72377237
ASTContext &ctx = getASTContext();
7238-
if (ctx.Diags.hadAnyError() || ctx.hasDelayedConformanceErrors())
7238+
if (ctx.hadError())
72397239
return;
72407240

72417241
ctx.Diags.diagnose(target.getLoc(), diag::failed_to_produce_diagnostic);

0 commit comments

Comments
 (0)