[PATCH] D157747: Support Unicode Microsoft predefined macros

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 22 08:20:43 PDT 2023


aaron.ballman added a comment.

In D157747#4581933 <https://reviews.llvm.org/D157747#4581933>, @cor3ntin wrote:

> This does not appear to be valid under MSVC and I don't think we should support features that MS does not (Nor can i find any documentation that it ought to work)
> https://godbolt.org/z/7Te3YYeb9

Agreed -- we typically do not want to make extensions to Microsoft's extensions.

> Supporting the same concatenation behavior MSVC does have seem like a cleaner approach. We would not have an many new tokens.
> Before you do anything though. I'd like the feedback of more folks.
>
> I can't find any documentation for LPREFIX, but it seems in the general case, it can be emulated that way https://godbolt.org/z/dr7MjMs99
>
> In terms of breaking change, it's only an issue if L/u/etc are existing macro at the point of use.

It's a bit hard to reason about `__LPREFIX` given there's no documentation for it and it's not a macro that expands to anything we can poke at. However, https://github.com/llvm/llvm-project/issues/27402 shows there is interest in having Clang support it, so I weakly lean towards that option, though it may be more effort to reverse engineer how it works for various edge cases.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157747/new/

https://reviews.llvm.org/D157747



More information about the cfe-commits mailing list