Skip to content

Commit 9b3d2a0

Browse files
authored
Merge pull request #84005 from hamishknight/duet
2 parents 10dc870 + a9e339b commit 9b3d2a0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/Sema/CSApply.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ namespace {
452452
void addLocalDeclToTypeCheck(Decl *D) {
453453
// If we're doing code completion, avoid doing any further type-checking,
454454
// that should instead be handled by TypeCheckASTNodeAtLocRequest.
455-
if (ctx.CompletionCallback)
455+
if (ctx.SourceMgr.hasIDEInspectionTargetBuffer())
456456
return;
457457

458458
LocalDeclsToTypeCheck.push_back(D);
@@ -461,7 +461,7 @@ namespace {
461461
void addMacroToExpand(MacroExpansionExpr *E) {
462462
// If we're doing code completion, avoid doing any further type-checking,
463463
// that should instead be handled by TypeCheckASTNodeAtLocRequest.
464-
if (ctx.CompletionCallback)
464+
if (ctx.SourceMgr.hasIDEInspectionTargetBuffer())
465465
return;
466466

467467
MacrosToExpand.push_back(E);

validation-test/IDE/crashers/ce6e7a44344828a0.swift renamed to validation-test/IDE/crashers_fixed/ce6e7a44344828a0.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// {"kind":"complete","signature":"(anonymous namespace)::ConstraintWalker::walkToExprPost(swift::Expr*)"}
2-
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
2+
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
33
enum a }
44
{
55
var b: a func c { switch b {

validation-test/IDE/crashers/e7327cfd8bafcd86.swift renamed to validation-test/IDE/crashers_fixed/e7327cfd8bafcd86.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// {"kind":"complete","original":"bc7ab9d8","signature":"swift::constraints::ConstraintSystem::getTypeOfReference(swift::ValueDecl*, swift::FunctionRefInfo, swift::constraints::ConstraintLocatorBuilder, swift::DeclContext*, swift::constraints::PreparedOverloadBuilder*)","signatureAssert":"Assertion failed: (func->isOperator() && \"Lookup should only find operators\"), function getTypeOfReference"}
2-
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
2+
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
33
{
44
func a(query: String) {
55
{

0 commit comments

Comments
 (0)