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 {
4449
4449
CallbackCondition (const BinaryExpr *BE, const FuncDecl *Operator) {
4450
4450
bool FoundNil = false ;
4451
4451
for (auto *Operand : {BE->getLHS (), BE->getRHS ()}) {
4452
+ Operand = Operand->getSemanticsProvidingExpr ();
4452
4453
if (isa<NilLiteralExpr>(Operand)) {
4453
4454
FoundNil = true ;
4454
4455
} else if (auto *DRE = dyn_cast<DeclRefExpr>(Operand)) {
@@ -4896,9 +4897,9 @@ struct CallbackClassifier {
4896
4897
Exprs.push_back (BoolExpr);
4897
4898
4898
4899
while (!Exprs.empty ()) {
4899
- auto *Next = Exprs.pop_back_val ();
4900
+ auto *Next = Exprs.pop_back_val ()-> getSemanticsProvidingExpr () ;
4900
4901
if (auto *ACE = dyn_cast<AutoClosureExpr>(Next))
4901
- Next = ACE->getSingleExpressionBody ();
4902
+ Next = ACE->getSingleExpressionBody ()-> getSemanticsProvidingExpr () ;
4902
4903
4903
4904
if (auto *BE = dyn_cast_or_null<BinaryExpr>(Next)) {
4904
4905
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