Skip to content

Commit b52fdb9

Browse files
authored
Apply suggestions from MSVC workaround
1 parent 9acb1e1 commit b52fdb9

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9381,9 +9381,8 @@ Parser::parseDeclPrecedenceGroup(ParseDeclOptions flags,
93819381
auto checkCodeCompletion =
93829382
[&](CodeCompletionCallbacks::PrecedenceGroupCompletionKind SK) -> bool {
93839383
if (Tok.is(tok::code_complete)) {
9384-
if (CodeCompletionCallbacks) {
9385-
CodeCompletionCallbacks->completeInPrecedenceGroup(SK);
9386-
}
9384+
if (this->CodeCompletionCallbacks)
9385+
this->CodeCompletionCallbacks->completeInPrecedenceGroup(SK);
93879386
consumeToken();
93889387
return true;
93899388
}

lib/Parse/ParseExpr.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,8 @@ ParserResult<Expr> Parser::parseExprKeyPathObjC() {
734734
Context, keywordLoc, lParenLoc, components, Tok.getLoc());
735735
}
736736

737-
if (CodeCompletionCallbacks) {
738-
CodeCompletionCallbacks->completeExprKeyPath(expr, DotLoc);
739-
}
737+
if (this->CodeCompletionCallbacks)
738+
this->CodeCompletionCallbacks->completeExprKeyPath(expr, DotLoc);
740739

741740
// Eat the code completion token because we handled it.
742741
consumeToken(tok::code_complete);

lib/Parse/ParsePattern.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,8 @@ Parser::parseParameterClause(SourceLoc &leftParenLoc,
245245
if (paramContext != ParameterContextKind::EnumElement) {
246246
auto AttrStatus = parseDeclAttributeList(param.Attrs);
247247
if (AttrStatus.hasCodeCompletion()) {
248-
if (CodeCompletionCallbacks) {
249-
CodeCompletionCallbacks->setAttrTargetDeclKind(DeclKind::Param);
250-
}
248+
if (this->CodeCompletionCallbacks)
249+
this->CodeCompletionCallbacks->setAttrTargetDeclKind(DeclKind::Param);
251250
status.setHasCodeCompletionAndIsError();
252251
}
253252
}

0 commit comments

Comments
 (0)