[libcxx-commits] [PATCH] D95848: Add `noexcept` to `string::find` and similar members.
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 2 09:53:17 PST 2021
zoecarver added a comment.
In D95848#2537017 <https://reviews.llvm.org/D95848#2537017>, @zoecarver wrote:
>> Shouldn't it be tested with ASSERT_NOEXCEPT or rather with its libc++-specific equivalent (LIBCPP_ASSERT_NOEXCEPT)?
> Hmm, as far as I can tell, currently we don't test whether these members are noexcept, but that also doesn't mean we shouldn't. If I do add it, I'll put it under the `libcxx/` directory (and I should probably test the other overloads as well). I don't really like the idea of testing something this simple, I'm not sure how much we gain from that, especially when the standard doesn't require it. What's the case where one of these tests would fail?
Thinking about it more. I think we do //try// to test noexcept specifiers in other places, so it probably does make sense to test these as well. I'll add tests for the changed functions and other overloads.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits