[clang] [Clang] Only check exprs that might be immediate escalating in evaluated contexts (PR #93187)

via cfe-commits cfe-commits at lists.llvm.org
Thu May 23 06:36:43 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];
----------------
cor3ntin wrote:

Yes, I was actually thinking of doing that!

https://github.com/llvm/llvm-project/pull/93187


More information about the cfe-commits mailing list