[PATCH] D151094: [clang] Implement P2564 "consteval must propagate up"

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 2 06:49:40 PDT 2023


erichkeane added a comment.

I don't understand our consteval implementation enough to approve this, but I didn't see anything to comment on while going through this.



================
Comment at: clang/include/clang/Sema/Sema.h:1071
         FD->setWillHaveBody(true);
-      else
+        S.ExprEvalContexts.back().InImmediateFunctionContext =
+            FD->isImmediateFunction();
----------------
I'm annoyed that we do `ExprEvalContexts.back()` as often as we do, and don't just have `Sema::curExprEvalContext`.

There isn't really anything for you to do here, but I wanted to tell someone of this annoyance, as this is the 3rd time its popped up in a week for me :/


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151094/new/

https://reviews.llvm.org/D151094



More information about the cfe-commits mailing list