Skip to content

Commit 781b481

Browse files
committed
[CodeCompletion] Suppress diagnostics emitted during operator checking
1 parent cb538c4 commit 781b481

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/IDE/PostfixCompletion.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,10 @@ getOperatorCompletionTypes(DeclContext *DC, Type LHSType, OperatorDecl *Op) {
224224

225225
UnresolvedDeclRefExpr UDRE(DeclNameRef(Op->getName()),
226226
getDeclRefKindOfOperator(Op), DeclNameLoc(Loc));
227+
DiagnosticTransaction IgnoreDiags(DC->getASTContext().Diags);
227228
Expr *OpExpr =
228229
resolveDeclRefExpr(&UDRE, DC, /*replaceInvalidRefsWithErrors=*/true);
230+
IgnoreDiags.abort();
229231
if (isa<ErrorExpr>(OpExpr)) {
230232
// If we couldn't resolve the operator (e.g. because there is only an
231233
// operator definition but no decls that implement it), we can't call the

0 commit comments

Comments
 (0)