[libcxx-commits] [PATCH] D140675: [AIX][libc++] Always opt in to _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 5 03:46:21 PST 2023
Mordante added inline comments.
================
Comment at: libcxx/test/libcxx/vendor/ibm/bad_function_call.pass.cpp:24
+ r();
+ return 0;
+}
----------------
Based on the comments of the test, wouldn't it be better also add test that actually throws `bad_function_call`?
Maybe a function like
```
void test_throw()
{
#ifndef TEST_HAS_NO_EXCEPTIONS
std::function<int()> f;
try {
f();
assert(false);
} catch(const std::bad_function_call&) {
return;
}
assert(false);
#endif // TEST_HAS_NO_EXCEPTIONS
}
```
And call this function from main?
Note this change requires the following include `#include "test_macros.h"`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140675/new/
https://reviews.llvm.org/D140675
More information about the libcxx-commits
mailing list