================
@@ -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()
----------------
perry-ca wrote:

The _Export keyword is part of the declarator.  This code is to stop the 
declspec parsing.  For example, in `int _Export x,y;` only `x` is exported.  
The flag was added to the DeclSpec class to handle the case of `class _Export 
A`.  That is later passed on to the Decl for the class.  If there is a better 
way to do this, I'd be interested.  We do have to match the existing XL 
compiler for backwards compatibility.

https://github.com/llvm/llvm-project/pull/111035
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to