================
@@ -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()
----------------
AaronBallman wrote:
> in int _Export x,y; only x is exported.
That is deeply strange behavior IMO. I can't think of anything else in the
language that works like that in that syntactic position.
> We do have to match the existing XL compiler for backwards compatibility.
That can be handled in the downstream too. For example, in this case, I would
expect a diagnostic to let the user know that `_Export` very likely does not
behave the way they expect in your code example.
https://github.com/llvm/llvm-project/pull/111035
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits