File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
test/refactoring/ConvertAsync Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4466,6 +4466,7 @@ struct CallbackCondition {
4466
4466
CallbackCondition (const BinaryExpr *BE, const FuncDecl *Operator) {
4467
4467
bool FoundNil = false ;
4468
4468
for (auto *Operand : BE->getArg ()->getElements ()) {
4469
+ Operand = Operand->getSemanticsProvidingExpr ();
4469
4470
if (isa<NilLiteralExpr>(Operand)) {
4470
4471
FoundNil = true ;
4471
4472
} else if (auto *DRE = dyn_cast<DeclRefExpr>(Operand)) {
@@ -4912,9 +4913,9 @@ struct CallbackClassifier {
4912
4913
Exprs.push_back (BoolExpr);
4913
4914
4914
4915
while (!Exprs.empty ()) {
4915
- auto *Next = Exprs.pop_back_val ();
4916
+ auto *Next = Exprs.pop_back_val ()-> getSemanticsProvidingExpr () ;
4916
4917
if (auto *ACE = dyn_cast<AutoClosureExpr>(Next))
4917
- Next = ACE->getSingleExpressionBody ();
4918
+ Next = ACE->getSingleExpressionBody ()-> getSemanticsProvidingExpr () ;
4918
4919
4919
4920
if (auto *BE = dyn_cast_or_null<BinaryExpr>(Next)) {
4920
4921
auto *Operator = isOperator (BE);
Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ withError { res, err in
313
313
// RUN: %refactor -convert-call-to-async-alternative -dump-text -source-filename %s -pos=%(line+1):3 | %FileCheck -check-prefix=UNBOUND %s
314
314
withError { res, err in
315
315
print ( " before " )
316
- if res != nil && err == nil {
316
+ if ( ( res != ( nil ) ) && err == nil ) {
317
317
print ( " got result \( res!) " )
318
318
} else {
319
319
print ( " got error \( err!) " )
You can’t perform that action at this time.
0 commit comments