File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -20448,17 +20448,18 @@ Decl *Sema::ActOnFileScopeAsmDecl(Expr *expr,
20448
20448
20449
20449
TopLevelStmtDecl *Sema::ActOnStartTopLevelStmtDecl(Scope *S) {
20450
20450
auto *New = TopLevelStmtDecl::Create(Context, /*Statement=*/nullptr);
20451
+ CurContext->addDecl(New);
20452
+ PushDeclContext(S, New);
20451
20453
PushFunctionScope();
20452
20454
PushCompoundScope(false);
20453
- PushDeclContext(S, New);
20454
20455
return New;
20455
20456
}
20456
20457
20457
20458
void Sema::ActOnFinishTopLevelStmtDecl(TopLevelStmtDecl *D, Stmt *Statement) {
20458
20459
D->setStmt(Statement);
20459
- PopDeclContext();
20460
20460
PopCompoundScope();
20461
20461
PopFunctionScopeInfo();
20462
+ PopDeclContext();
20462
20463
}
20463
20464
20464
20465
void Sema::ActOnPragmaRedefineExtname(IdentifierInfo* Name,
You can’t perform that action at this time.
0 commit comments