https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/77312
>From e31bf72dfadd4f4b9a316917cc0919fdef203498 Mon Sep 17 00:00:00 2001 From: huqizhi <huqi...@feysh.com> Date: Mon, 8 Jan 2024 22:15:09 +0800 Subject: [PATCH] [clang] pop explicit to keep context stack balance --- clang/lib/Parse/ParseDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index b60ae293ef8c20..ed75609d0a538b 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -2637,7 +2637,6 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes( T.consumeOpen(); ExprVector Exprs; - InitializerScopeRAII InitScope(*this, D, ThisDecl); auto ThisVarDecl = dyn_cast_or_null<VarDecl>(ThisDecl); @@ -2669,6 +2668,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes( /*Braced=*/false); CalledSignatureHelp = true; } + InitScope.pop(); Actions.ActOnInitializerError(ThisDecl); SkipUntil(tok::r_paren, StopAtSemi); } else { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits