[PATCH] D147531: [clang] Reset track of immediate function context when entering new function

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 4 08:17:12 PDT 2023


cor3ntin accepted this revision.
cor3ntin added a comment.
This revision is now accepted and ready to land.

I reworked the comment a bit otherwise LGTM.



================
Comment at: clang/lib/Sema/SemaDecl.cpp:15178-15185
+  // Each ExpressionEvaluationContextRecord also keeps track on whether the
+  // context is nested in an immediate function context, so smaller contexts
+  // that appear inside immediate functions (like variable initializers) are
+  // considered to be inside an immediate function context even though by
+  // themselves they are not immediate function contexts. But when the new
+  // function is entered, we need to reset this tracking, since entered function
+  // might be not an immediate one and therefore everything inside of it needs
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147531



More information about the cfe-commits mailing list