@@ -5099,34 +5099,6 @@ class Sema final : public SemaBase {
50995099 /// example, in a for-range initializer).
51005100 bool InLifetimeExtendingContext = false;
51015101
5102- /// Whether we are currently in a context in which all temporaries must be
5103- /// materialized.
5104- ///
5105- /// [class.temporary]/p2:
5106- /// The materialization of a temporary object is generally delayed as long
5107- /// as possible in order to avoid creating unnecessary temporary objects.
5108- ///
5109- /// Temporary objects are materialized:
5110- /// (2.1) when binding a reference to a prvalue ([dcl.init.ref],
5111- /// [expr.type.conv], [expr.dynamic.cast], [expr.static.cast],
5112- /// [expr.const.cast], [expr.cast]),
5113- ///
5114- /// (2.2) when performing member access on a class prvalue ([expr.ref],
5115- /// [expr.mptr.oper]),
5116- ///
5117- /// (2.3) when performing an array-to-pointer conversion or subscripting
5118- /// on an array prvalue ([conv.array], [expr.sub]),
5119- ///
5120- /// (2.4) when initializing an object of type
5121- /// std::initializer_list<T> from a braced-init-list
5122- /// ([dcl.init.list]),
5123- ///
5124- /// (2.5) for certain unevaluated operands ([expr.typeid], [expr.sizeof])
5125- ///
5126- /// (2.6) when a prvalue that has type other than cv void appears as a
5127- /// discarded-value expression ([expr.context]).
5128- bool InMaterializeTemporaryObjectContext = false;
5129-
51305102 // When evaluating immediate functions in the initializer of a default
51315103 // argument or default member initializer, this is the declaration whose
51325104 // default initializer is being evaluated and the location of the call
@@ -6398,19 +6370,6 @@ class Sema final : public SemaBase {
63986370 }
63996371 }
64006372
6401- /// keepInMaterializeTemporaryObjectContext - Pull down
6402- /// InMaterializeTemporaryObjectContext flag from previous context.
6403- void keepInMaterializeTemporaryObjectContext() {
6404- if (ExprEvalContexts.size() > 2 &&
6405- ExprEvalContexts[ExprEvalContexts.size() - 2]
6406- .InMaterializeTemporaryObjectContext) {
6407- auto &LastRecord = ExprEvalContexts.back();
6408- auto &PrevRecord = ExprEvalContexts[ExprEvalContexts.size() - 2];
6409- LastRecord.InMaterializeTemporaryObjectContext =
6410- PrevRecord.InMaterializeTemporaryObjectContext;
6411- }
6412- }
6413-
64146373 DefaultedComparisonKind getDefaultedComparisonKind(const FunctionDecl *FD) {
64156374 return getDefaultedFunctionKind(FD).asComparison();
64166375 }
@@ -6554,12 +6513,6 @@ class Sema final : public SemaBase {
65546513 /// used in initializer of the field.
65556514 llvm::MapVector<FieldDecl *, DeleteLocs> DeleteExprs;
65566515
6557- bool isInMaterializeTemporaryObjectContext() const {
6558- assert(!ExprEvalContexts.empty() &&
6559- "Must be in an expression evaluation context");
6560- return ExprEvalContexts.back().InMaterializeTemporaryObjectContext;
6561- }
6562-
65636516 ParsedType getInheritingConstructorName(CXXScopeSpec &SS,
65646517 SourceLocation NameLoc,
65656518 const IdentifierInfo &Name);
0 commit comments