AaronBallman wrote:

> @AaronBallman I'm not _super_ worried about these specific cases, but I'd 
> like to know how to proceed with `msvc` attributes we'd like to use in libc++ 
> generally. 

I think there's three options.

1) Don't use `msvc` attributes in libc++ as they're not fit for use in system 
headers.
2) Use the `msvc` attributes in libc++ and do not support any uses where `msvc` 
attributes (or the vendor prefix) are in conflict with user macros.
3) Expose the `msvc` attributes under a new vendor prefix (in addition to the 
`msvc` namespace) and use those from libc++. This includes spelling it 
`__msvc__` or `_Msvc` (lol).

As a non-libc++ person, it's easy for me to support (1). :-D I really think 
Microsoft needs to address this issue on their end. Also as a non-libc++ 
person, I could live with (2). I'm not keen on (3) because this would mean that 
Clang has multiple vendor prefixes that mean "Clang" and makes it a bit 
confusing as to whether the attributes under the new vendor prefix are ours or 
Microsoft's when conflicts arise. e.g., we start having the risk of 
Clang-specific behaviors under one vendor spelling and Microsoft-specific 
behaviors under the other.

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

Reply via email to