Skip to content

Commit 4e27bbe

Browse files
committed
Flush active diag
1 parent 016854e commit 4e27bbe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,6 +2320,7 @@ Type TypeResolver::resolveAttributedType(TypeAttributes &attrs,
23202320
attrs.getLoc(TAK_escaping)));
23212321
// Specialize the diagnostic for Optionals.
23222322
if (ty->getOptionalObjectType()) {
2323+
diag.flush();
23232324
TC.diagnose(repr->getLoc(), diag::escaping_optional_type_argument);
23242325
}
23252326
}

0 commit comments

Comments
 (0)