@@ -496,12 +496,6 @@ bool TypeChecker::typeCheckFunctionBuilderFuncBody(FuncDecl *FD,
496
496
options |= TypeCheckExprFlags::ConvertTypeIsOpaqueReturnType;
497
497
}
498
498
499
- // If we are performing code-completion inside the functions body, supress
500
- // diagnostics to workaround typechecking performance problems.
501
- if (Context.SourceMgr .rangeContainsCodeCompletionLoc (
502
- FD->getBody ()->getSourceRange ()))
503
- options |= TypeCheckExprFlags::SuppressDiagnostics;
504
-
505
499
// Type-check the single result expression.
506
500
Type returnExprType = typeCheckExpression (returnExpr, FD,
507
501
TypeLoc::withoutLoc (returnType),
@@ -580,12 +574,6 @@ ConstraintSystem::TypeMatchResult ConstraintSystem::applyFunctionBuilder(
580
574
assert (!builderType->hasTypeParameter ());
581
575
}
582
576
583
- // If we are performing code-completion inside the closure body, supress
584
- // diagnostics to workaround typechecking performance problems.
585
- if (getASTContext ().SourceMgr .rangeContainsCodeCompletionLoc (
586
- closure->getSourceRange ()))
587
- Options |= ConstraintSystemFlags::SuppressDiagnostics;
588
-
589
577
BuilderClosureVisitor visitor (getASTContext (), this ,
590
578
/* wantExpr=*/ true , builderType);
591
579
Expr *singleExpr = visitor.visit (closure->getBody ());
0 commit comments