[PATCH] D15836: [libcxx] Fix undefined behavior in forward_list
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 26 16:15:08 PST 2016
EricWF accepted this revision.
EricWF added a reviewer: EricWF.
EricWF added a comment.
This revision is now accepted and ready to land.
Accepting on phab to reflect @mclow.lists LGTM.
================
Comment at: include/forward_list:369
@@ +368,3 @@
+ }
+ __node_pointer __get_node_unchecked() const {
+ return static_cast<__node_pointer>(
----------------
mclow.lists wrote:
> I would think about calling this `__get_node_dereferencable` or something similar.
> When I looked at this first, I wondered "is there another call that does checking?"
>
`__get_node_unchecked` definitely needs a new name then because the returned pointers are not guaranteed to be dereferencable.
I'll change this to "__get_unsafe_node_pointer".
http://reviews.llvm.org/D15836
More information about the cfe-commits
mailing list