[clang] [Clang] Only check exprs that might be immediate escalating in evaluated contexts (PR #93187)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Thu May 23 06:33:23 PDT 2024
================
@@ -5146,6 +5153,12 @@ class Sema final : public SemaBase {
return ExprEvalContexts.back();
};
+ const ExpressionEvaluationContextRecord &parentEvaluationContext() const {
+ assert(ExprEvalContexts.size() >= 2 &&
+ "Must be in an expression evaluation context");
+ return ExprEvalContexts[ExprEvalContexts.size() - 2];
----------------
Fznamznon wrote:
I can grep at least 4 places in clang/lib/sema where we do `ExprEvalContexts.size() - 2`. Would be a good first issue to switch these to `parentEvaluationContext` calls (once we merge this patch)?
https://github.com/llvm/llvm-project/pull/93187
More information about the cfe-commits
mailing list