[libcxx-commits] [PATCH] D102195: [libcxx] NFC. Add missed articles in _LIBCPP_ASSERT debug messages
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 10 14:51:00 PDT 2021
Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.
Seems fine to me % comments. A little churn-y, but moving in a good direction IMO.
================
Comment at: libcxx/include/deque:2724
{
- _LIBCPP_ASSERT(!empty(), "deque::pop_back called for empty deque");
+ _LIBCPP_ASSERT(!empty(), "deque::pop_back called for an empty deque");
allocator_type& __a = __base::__alloc();
----------------
As long as we're changing this wording, let's make it "called **on** an empty deque."
================
Comment at: libcxx/include/iterator:1390
_LIBCPP_ASSERT(__get_const_db()->__addable(this, __n),
- "Attempted to add/subtract iterator outside of valid range");
+ "Attempted to add/subtract an iterator outside of valid range");
#endif
----------------
"...outside its valid range"? Or just "...outside its range"?
================
Comment at: libcxx/include/list:1775
{
- _LIBCPP_ASSERT(!empty(), "list::pop_back() called with empty list");
+ _LIBCPP_ASSERT(!empty(), "list::pop_back() called with an empty list");
__node_allocator& __na = base::__node_alloc();
----------------
"...called **on** an empty list"
================
Comment at: libcxx/include/optional:881
{
- _LIBCPP_ASSERT(this->has_value(), "optional operator-> called for disengaged value");
+ _LIBCPP_ASSERT(this->has_value(), "optional operator-> called for a disengaged value");
#ifndef _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
----------------
"optional::operator-> called on a disengaged optional"
================
Comment at: libcxx/include/vector:677
{
- _LIBCPP_ASSERT(!empty(), "front() called for empty vector");
+ _LIBCPP_ASSERT(!empty(), "front() called for an empty vector");
return *this->__begin_;
----------------
"called **on**" throughout
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102195/new/
https://reviews.llvm.org/D102195
More information about the libcxx-commits
mailing list