[libcxx-commits] [PATCH] D140675: [AIX][libc++] Always opt in to _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
Michael Francis via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 7 23:38:06 PST 2023
francii added inline comments.
================
Comment at: libcxx/test/libcxx/vendor/ibm/bad_function_call.pass.cpp:24
+ r();
+ return 0;
+}
----------------
francii wrote:
> Mordante wrote:
> > 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"`
> Thanks for the suggestion!
>
> We're actually looking that it //doesn't// throw `bad_function_call`, as that is the original behaviour that this patch corrects. This test case is expected to compile without errors.
Sorry, I misunderstood your message. I see what you were saying now. I will update the test case shortly.
Thank you :)
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