Skip to content

Commit c33ad11

Browse files
committed
[Sema] Apply clang-format
1 parent 5394e6b commit c33ad11

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

lib/Sema/CSApply.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3262,7 +3262,7 @@ namespace {
32623262
}
32633263

32643264
Expr *visitUnresolvedMemberChainResultExpr(
3265-
UnresolvedMemberChainResultExpr *expr) {
3265+
UnresolvedMemberChainResultExpr *expr) {
32663266
// Since this expression only exists to give the result type of an
32673267
// unresolved member chain visibility in the AST, remove it from the AST
32683268
// now that we have a solution and coerce the subexpr to the resulting

lib/Sema/CSGen.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ namespace {
15051505
// Since base type in this case is completely dependent on context it
15061506
// should be marked as a potential hole.
15071507
auto baseTy = CS.createTypeVariable(baseLocator, TVO_CanBindToNoEscape |
1508-
TVO_CanBindToHole);
1508+
TVO_CanBindToHole);
15091509
setUnresolvedBaseType(expr, baseTy);
15101510

15111511
auto memberTy = CS.createTypeVariable(
@@ -1555,15 +1555,13 @@ namespace {
15551555
}
15561556

15571557
Type visitUnresolvedMemberChainResultExpr(
1558-
UnresolvedMemberChainResultExpr *expr) {
1558+
UnresolvedMemberChainResultExpr *expr) {
15591559
auto *tail = expr->getSubExpr();
1560-
assert(isa<UnresolvedMemberExpr>(tail) ||
1561-
isa<UnresolvedDotExpr>(tail) ||
1562-
isa<CallExpr>(tail) ||
1563-
isa<BindOptionalExpr>(tail) ||
1560+
assert(isa<UnresolvedMemberExpr>(tail) || isa<UnresolvedDotExpr>(tail) ||
1561+
isa<CallExpr>(tail) || isa<BindOptionalExpr>(tail) ||
15641562
isa<ForceValueExpr>(tail) ||
15651563
isa<SubscriptExpr>(tail) &&
1566-
"Unexpected expression at end of unresolved member chain");
1564+
"Unexpected expression at end of unresolved member chain");
15671565

15681566
auto memberTy = CS.getType(tail);
15691567
auto *base = getUnresolvedChainBase(tail);
@@ -1576,16 +1574,17 @@ namespace {
15761574

15771575
// The contextual type (represented with a new type variable) must equal
15781576
// the base type.
1579-
auto locator = CS.getConstraintLocator(expr,
1580-
ConstraintLocator::UnresolvedMemberChainResult);
1577+
auto locator = CS.getConstraintLocator(
1578+
expr, ConstraintLocator::UnresolvedMemberChainResult);
15811579
auto tvo = additionalOptions | TVO_CanBindToHole | TVO_CanBindToNoEscape;
15821580
auto chainResultTy = CS.createTypeVariable(locator, tvo);
15831581
auto chainBaseTy = UnresolvedBaseTypes.find(base)->second;
15841582

15851583
// The result of this element of the chain must be convertible to the
15861584
// contextual type, and the contextual type must be equal to the base.
1587-
CS.addConstraint(ConstraintKind::Conversion, memberTy, chainBaseTy,
1588-
CS.getConstraintLocator(tail, ConstraintLocator::RValueAdjustment));
1585+
CS.addConstraint(
1586+
ConstraintKind::Conversion, memberTy, chainBaseTy,
1587+
CS.getConstraintLocator(tail, ConstraintLocator::RValueAdjustment));
15891588
CS.addConstraint(ConstraintKind::Conversion, memberTy, chainResultTy,
15901589
locator);
15911590
CS.addConstraint(ConstraintKind::Equal, chainBaseTy, chainResultTy,

0 commit comments

Comments
 (0)