[clang] [Clang] Fixes to immediate-escalating functions (PR #82281)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 21 11:37:57 PST 2024


================
@@ -1158,7 +1158,9 @@ class Sema final {
       if (FD) {
         FD->setWillHaveBody(true);
         S.ExprEvalContexts.back().InImmediateFunctionContext =
-            FD->isImmediateFunction();
+            FD->isImmediateFunction() ||
+            S.ExprEvalContexts[S.ExprEvalContexts.size() - 2]
----------------
AaronBallman wrote:

Someday... I would like to replace this with a function call so I can stop going "wait, is -2 okay??" each time I see it. ;-)

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


More information about the cfe-commits mailing list