================
@@ -5676,24 +5676,32 @@ Parser::DeclGroupPtrTy Parser::ParseTopLevelStmtDecl() {
   // Parse a top-level-stmt.
   Parser::StmtVector Stmts;
   ParsedStmtContext SubStmtCtx = ParsedStmtContext();
-  Actions.PushFunctionScope();
+  ParseScope FnScope(this, Scope::FnScope | Scope::DeclScope |
----------------
weliveindetail wrote:

I tested without it the `ParseScope` and got a segfault, so I assume we can not 
drop it (without looking into the details). I kept both, `FnScope` and 
`CompoundStmtScope`, because in `ActOnStartTopLevelStmtDecl()` we push them on 
the Sema side as well.

https://github.com/llvm/llvm-project/pull/84150
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to