[clang] [SystemZ][z/OS] Implement #pragma export (PR #141671)

Sean Perry via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 20 07:28:19 PST 2025


================
@@ -1441,7 +1440,7 @@ bool Parser::zOSHandlePragmaHelper(tok::TokenKind PragmaKind) {
     }
 
     PP.Lex(Tok);
-    Actions.ActOnPragmaExport(IdentName, IdentNameLoc);
+    Actions.ActOnPragmaExport(IdentName, IdentNameLoc, getCurScope());
----------------
perry-ca wrote:

The current scope is available inside of the function.  However, the current scope inside of the function may not match the scope where the name reference occurred.  In this case the two are the same.  I thought about removing the argument but I noticed that it is common to pass the the current scope for these `ActOnPragma*` functions when the current scope is needed.  I'm leaning towards keeping the argument to be consistent.

https://github.com/llvm/llvm-project/pull/141671


More information about the cfe-commits mailing list