We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83265cf commit 27341abCopy full SHA for 27341ab
clang/lib/Sema/SemaDecl.cpp
@@ -20521,17 +20521,18 @@ Decl *Sema::ActOnFileScopeAsmDecl(Expr *expr,
20521
20522
TopLevelStmtDecl *Sema::ActOnStartTopLevelStmtDecl(Scope *S) {
20523
auto *New = TopLevelStmtDecl::Create(Context, /*Statement=*/nullptr);
20524
+ CurContext->addDecl(New);
20525
+ PushDeclContext(S, New);
20526
PushFunctionScope();
20527
PushCompoundScope(false);
- PushDeclContext(S, New);
20528
return New;
20529
}
20530
20531
void Sema::ActOnFinishTopLevelStmtDecl(TopLevelStmtDecl *D, Stmt *Statement) {
20532
D->setStmt(Statement);
- PopDeclContext();
20533
PopCompoundScope();
20534
PopFunctionScopeInfo();
20535
+ PopDeclContext();
20536
20537
20538
void Sema::ActOnPragmaRedefineExtname(IdentifierInfo* Name,
0 commit comments