Skip to content

Refactor so that we check FOR the token instead of the lack of one #26122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1022,8 +1022,7 @@ void SwiftDocumentSemanticInfo::processLatestSnapshotAsync(
EditableTextBufferRef EditableBuffer) {

SwiftInvocationRef Invok = InvokRef;
if (!Invok)
return;
if (Invok){

RefPtr<SwiftDocumentSemanticInfo> SemaInfoRef = this;
auto Consumer = std::make_shared<AnnotAndDiagASTConsumer>(EditableBuffer,
Expand All @@ -1035,6 +1034,7 @@ void SwiftDocumentSemanticInfo::processLatestSnapshotAsync(
const void *OncePerASTToken = SemaInfoRef.get();
if (auto ASTMgr = this->ASTMgr.lock()) {
ASTMgr->processASTAsync(Invok, std::move(Consumer), OncePerASTToken);
}
}
}

Expand Down Expand Up @@ -1522,12 +1522,14 @@ class PlaceholderExpansionScanner {
// Unresolved member can have argument too.
Arg = UME->getArgument();
}
if (!Arg)
return false;
if (Arg){

if (EnclosingCallAndArg.first)
OuterExpr = EnclosingCallAndArg.first;
EnclosingCallAndArg = {E, Arg};
return true;
}
return false;
}

bool walkToExprPre(Expr *E) override {
Expand Down