[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 13 06:30:30 PDT 2021


cor3ntin marked an inline comment as done.
cor3ntin added inline comments.


================
Comment at: clang/test/CodeGen/string-literal-short-wstring.c:17
   // MSABI: linkonce_odr dso_local unnamed_addr constant [3 x i16] [i16 65, i16 66, i16 0]
-  const wchar_t *foo = L"AB";
+  const unsigned short *foo = L"AB";
 
----------------
aaron.ballman wrote:
> I'd feel most comfortable if the top of the file did:
> ```
> typedef __WCHAR_TYPE__ wchar_t;
> ```
> as that's the definition of `wchar_t` from the `stddef.h` provided by Clang.
Thanks, I was looking for exactly that


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106215



More information about the cfe-commits mailing list