[PATCH] [libcxx] std::codecvt - short wchar support

Jonathan Roelofs jonathan at codesourcery.com
Wed Apr 8 11:20:15 PDT 2015


A couple of drive-by comments.


REPOSITORY
  rL LLVM

================
Comment at: test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp:29
@@ +28,3 @@
+#if _WIN32
+    #define SIZEOF_WCHAR_T 2
+#elif __SIZEOF_WCHAR_T__ 
----------------
Does win32 not have `__SIZEOF_WCHAR_T__`?

================
Comment at: test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp:33
@@ +32,3 @@
+#else
+    #define SIZEOF_WCHAR_T 4
+#endif
----------------
The else should really be something to the tune of: `#error Can't tell how big wchar_t is on this platform". Otherwise this is a potential nightmare for people doing ports.

================
Comment at: test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp:28
@@ +27,3 @@
+#else
+    #define SIZEOF_WCHAR_T 4
+#endif
----------------
same here. Maybe this macro should go in one of the test support headers instead?

http://reviews.llvm.org/D8880

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list