[PATCH] Tame a few enum size tests when using -fshort-enums on ARM.

Tim Northover t.p.northover at gmail.com
Tue Aug 12 11:31:19 PDT 2014


Not really a review, as I don't know how these tests are supposed to work, but one comment that you may well know and have made an active decision on already (but just in case not)...

================
Comment at: libcxx/test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp:55
@@ -54,1 +54,3 @@
     test_make_signed< const wchar_t, std::conditional<sizeof(wchar_t) == 4, const int, const short>::type >();
+#if defined(__ARM_SIZEOF_MINIMAL_ENUM) && __ARM_SIZEOF_MINIMAL_ENUM == 1
+    test_make_signed< const Enum, const signed char >();
----------------
I think the preprocessor rules mean that __ARM_SIZEOF_MINIMAL_ENUM gets the notional value 0 if it's not defined, so you can probably skip the first condition if you want.

http://reviews.llvm.org/D4869






More information about the cfe-commits mailing list