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 @@ -4449,6 +4449,7 @@ struct CallbackCondition {
44494449 CallbackCondition (const BinaryExpr *BE, const FuncDecl *Operator) {
44504450 bool FoundNil = false ;
44514451 for (auto *Operand : {BE->getLHS (), BE->getRHS ()}) {
4452+ Operand = Operand->getSemanticsProvidingExpr ();
44524453 if (isa<NilLiteralExpr>(Operand)) {
44534454 FoundNil = true ;
44544455 } else if (auto *DRE = dyn_cast<DeclRefExpr>(Operand)) {
@@ -4896,9 +4897,9 @@ struct CallbackClassifier {
48964897 Exprs.push_back (BoolExpr);
48974898
48984899 while (!Exprs.empty ()) {
4899- auto *Next = Exprs.pop_back_val ();
4900+ auto *Next = Exprs.pop_back_val ()-> getSemanticsProvidingExpr () ;
49004901 if (auto *ACE = dyn_cast<AutoClosureExpr>(Next))
4901- Next = ACE->getSingleExpressionBody ();
4902+ Next = ACE->getSingleExpressionBody ()-> getSemanticsProvidingExpr () ;
49024903
49034904 if (auto *BE = dyn_cast_or_null<BinaryExpr>(Next)) {
49044905 auto *Operator = isOperator (BE);
Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ withError { res, err in
313313// RUN: %refactor -convert-call-to-async-alternative -dump-text -source-filename %s -pos=%(line+1):3 | %FileCheck -check-prefix=UNBOUND %s
314314withError { res, err in
315315 print ( " before " )
316- if res != nil && err == nil {
316+ if ( ( res != ( nil ) ) && err == nil ) {
317317 print ( " got result \( res!) " )
318318 } else {
319319 print ( " got error \( err!) " )
You can’t perform that action at this time.
0 commit comments