Google is working to clean up a local patch to libc++ that allows
string_view to be constructed from null pointers. In order to do this we
need to intercept the call to char_traits::length. This temporary change
allows google to live at head with libc++ while it cleans up
non-conforming code.
Details
Details
- Reviewers
ldionne - Group Reviewers
Restricted Project
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
Comment Actions
I'll go ahead and land D121231, and we can land this patch on top if it makes your life easier in terms of upstream/downstream maintenance.
libcxx/include/string_view | ||
---|---|---|
320 | With this patch, we are not asserting that __s != nullptr. I'd be OK with the patch if that were addressed. TBH I'm mostly neutral on how we solve this problem, as long as we get rid of the naked call to __libcpp_debug_function and we retain the _LIBCPP_ASSERT(__s != nullptr) upstream. |
Comment Actions
I landed my patch last week -- I assume you resolved the merge conflict internally already. If we want to move forward with something like this, let's do it, otherwise, we can abandon the patch to clear up the review queue!
With this patch, we are not asserting that __s != nullptr. I'd be OK with the patch if that were addressed. TBH I'm mostly neutral on how we solve this problem, as long as we get rid of the naked call to __libcpp_debug_function and we retain the _LIBCPP_ASSERT(__s != nullptr) upstream.