Skip to content

Commit 9acb1e1

Browse files
authored
Apply suggestions for VS2019 workaround
The MSVC 2019 14.29 toolset seems to not properly handle the member variable reference in this case. Workaround this by explicitly using the `this` identifier to indicate that we would like to access the member variable. This is repaired in newer toolsets, however, the CI is currently using the older toolset.
1 parent 024e2c9 commit 9acb1e1

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/Parse/ParseExpr.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -699,9 +699,8 @@ ParserResult<Expr> Parser::parseExprKeyPath() {
699699
CodeCompletionExpr(pathResult.getPtrOrNull(), Tok.getLoc());
700700
auto *keypath = KeyPathExpr::createParsed(
701701
Context, backslashLoc, rootResult.getPtrOrNull(), CC, hasLeadingDot);
702-
if (CodeCompletionCallbacks) {
703-
CodeCompletionCallbacks->completeExprKeyPath(keypath, DotLoc);
704-
}
702+
if (this->CodeCompletionCallbacks)
703+
this->CodeCompletionCallbacks->completeExprKeyPath(keypath, DotLoc);
705704
consumeToken(tok::code_complete);
706705
return makeParserCodeCompletionResult(keypath);
707706
}
@@ -3138,10 +3137,9 @@ ParserStatus Parser::parseExprList(tok leftTok, tok rightTok,
31383137
} else if (isArgumentList && Tok.is(tok::code_complete)) {
31393138
// Handle call arguments specially because it may need argument labels.
31403139
auto CCExpr = new (Context) CodeCompletionExpr(Tok.getLoc());
3141-
if (CodeCompletionCallbacks) {
3142-
CodeCompletionCallbacks->completeCallArg(CCExpr,
3143-
PreviousLoc == leftLoc);
3144-
}
3140+
if (this->CodeCompletionCallbacks)
3141+
this->CodeCompletionCallbacks->completeCallArg(CCExpr,
3142+
PreviousLoc == leftLoc);
31453143
consumeIf(tok::code_complete);
31463144
SubExpr = CCExpr;
31473145
Status.setHasCodeCompletionAndIsError();

0 commit comments

Comments
 (0)