@@ -44,12 +44,12 @@ class ExpectedTypeContext {
4444 // / Pre typechecked type of the expression at the completion position.
4545 Type IdealType;
4646
47- // / Whether the `ExpectedTypes` comes from a single-expression body , e.g.
47+ // / Whether the `ExpectedTypes` comes from an implied result , e.g.
4848 // / `foo({ here })`.
4949 // /
5050 // / Since the input may be incomplete, we take into account that the types are
5151 // / only a hint.
52- bool IsImplicitSingleExpressionReturn = false ;
52+ bool IsImpliedResult = false ;
5353 bool PreferNonVoid = false ;
5454
5555 // / If not empty, \c PossibleTypes are ignored and types that have an
@@ -86,7 +86,7 @@ class ExpectedTypeContext {
8686 if (!IdealType || !Other.IdealType || !IdealType->isEqual (Other.IdealType )) {
8787 IdealType = Type ();
8888 }
89- IsImplicitSingleExpressionReturn |= Other.IsImplicitSingleExpressionReturn ;
89+ IsImpliedResult |= Other.IsImpliedResult ;
9090 PreferNonVoid &= Other.PreferNonVoid ;
9191 ExpectedCustomAttributeKinds |= Other.ExpectedCustomAttributeKinds ;
9292 }
@@ -96,7 +96,7 @@ class ExpectedTypeContext {
9696 void setIdealType (Type IdealType) { this ->IdealType = IdealType; }
9797
9898 bool requiresNonVoid () const {
99- if (IsImplicitSingleExpressionReturn )
99+ if (IsImpliedResult )
100100 return false ;
101101 if (PreferNonVoid)
102102 return true ;
@@ -105,13 +105,12 @@ class ExpectedTypeContext {
105105 return llvm::all_of (PossibleTypes, [](Type Ty) { return !Ty->isVoid (); });
106106 }
107107
108- bool isImplicitSingleExpressionReturn () const {
109- return IsImplicitSingleExpressionReturn ;
108+ bool isImpliedResult () const {
109+ return IsImpliedResult ;
110110 }
111111
112- void
113- setIsImplicitSingleExpressionReturn (bool IsImplicitSingleExpressionReturn) {
114- this ->IsImplicitSingleExpressionReturn = IsImplicitSingleExpressionReturn;
112+ void setIsImpliedResult (bool IsImpliedResult) {
113+ this ->IsImpliedResult = IsImpliedResult;
115114 }
116115
117116 bool getPreferNonVoid () const { return PreferNonVoid; }
0 commit comments