================ @@ -7810,9 +7813,11 @@ class Sema final : public SemaBase { } bool isInLifetimeExtendingContext() const { - assert(!ExprEvalContexts.empty() && ---------------- yronglin wrote:
Oh, I understand your concern. It's because we use `Sema::currentEvaluationContext()`, it's already has checked that `ExprEvalContexts` is not empty, so I removed assertion in `isInLifetimeExtendingContext`. ```C++ const ExpressionEvaluationContextRecord ¤tEvaluationContext() const { assert(!ExprEvalContexts.empty() && "Must be in an expression evaluation context"); return ExprEvalContexts.back(); }; ``` https://github.com/llvm/llvm-project/pull/108039 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits