[PATCH] unexpected/terminate support for MS CRT

Agustín Bergé kaballo86 at hotmail.com
Fri Aug 29 14:51:04 PDT 2014


================
Comment at: test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp:32
@@ -28,3 +31,3 @@
     // verify there is a previous unexpected handler
     assert(old);
     std::set_unexpected(f1);
----------------
This assertion does not hold for MSVCRT, as a null handler represents the default behavior. Would it be better to make this check conditionally instead of marking the whole test as failed?

================
Comment at: test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp:40
@@ -36,3 +39,3 @@
     std::set_terminate(f3);
     (*old)();
     assert(0);
----------------
This does not hold for MSVCRT either. Assuming the previous assertion is skipped for it, this could be tested by setting the unexpected handler to its original value and calling `unexpected()`.

http://reviews.llvm.org/D5131






More information about the cfe-commits mailing list