Skip to content

Commit 6797148

Browse files
committed
[CS] Only check for the presence of a paren expr
1 parent b33c520 commit 6797148

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2194,16 +2194,8 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
21942194
// type to an optional.
21952195
auto isIUOCallWrappedInParens = [&]() {
21962196
auto paren = getParentExpr(locator->getAnchor());
2197-
auto call = getParentExpr(paren);
2198-
2199-
if (call && isa<CallExpr>(call)) {
2200-
auto callExpr = cast<CallExpr>(call);
2201-
if (callExpr->getFn() != callExpr->getSemanticFn()) {
2202-
return true;
2203-
}
2204-
}
2205-
2206-
return false;
2197+
auto result = paren ? isa<ParenExpr>(paren) : false;
2198+
return result;
22072199
};
22082200

22092201
// In some cases we already created the appropriate bind constraints.

0 commit comments

Comments
 (0)