================
@@ -16681,7 +16677,8 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
if (!IsInstantiation)
PopDeclContext();
- PopFunctionScopeInfo(ActivePolicy, dcl);
+ if (!RetainFunctionScopeInfo)
+ PopFunctionScopeInfo(ActivePolicy, dcl);
----------------
erichkeane wrote:
Do we have some sort of assert to make sure we don't ever end up with unpopped
scopes at the end of a TU?
Also, we probably need to document the new bool in a way that makes it clear
that you MUST be responsible for popping your own function scope if you pass
'true'.
https://github.com/llvm/llvm-project/pull/154106
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits