[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 25 08:30:14 PDT 2025


================
@@ -4456,6 +4456,12 @@ void Parser::ParseDeclarationSpecifiers(
       isInvalid = DS.setFunctionSpecNoreturn(Loc, PrevSpec, DiagID);
       break;
 
+    case tok::kw__Export:
+      // If we find kw__Export, it is being applied to a var or function
+      // This will be handled in ParseDeclaratorInternal()
----------------
hubert-reinterpretcast wrote:

> That is deeply strange behavior IMO. I can't think of anything else in the language that works like that in that syntactic position.

In the traditional implementation, `_Export` is a declarator like `*` is, except it binds more strongly than `(<function parameters>)` or `[<array bound>]`.


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


More information about the cfe-commits mailing list