[PATCH] D14653: [libcxx] Introduce the mechanism for fixing -fno-exceptions test failures.
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 27 08:49:06 PST 2016
mclow.lists added inline comments.
Comment at: include/__config:847
@@ +846,3 @@
+#define _LIBCPP_THROW(E, MSG) __libcxx_noexceptions_report(MSG)
+#else // !_LIBCPP_NO_EXCEPTIONS
I don't care for having to specify something twice. (E, MSG). Maybe "stringify" E and make that the message.
Comment at: test/support/noexcept.h:23
@@ +22,3 @@
+// tests use multiple catch statements, in those cases we have to use the
+// _LIBCPP_NO_EXCEPTIONS macro and exclude the additional catch statements.
I don't care for this; I think that "implementing a mechanism for throwing exceptions in the test suite for when we've disabled exceptions" seems like something that we'll have to revisit time and time again.
I wonder if it would be better to just split some tests into multiple tests (some parts that test exception handling, some that don't), and then XFAIL: no-exceptions the ones that test exception handling.
More information about the cfe-commits