Page MenuHomePhabricator

[libcxx] [test] Add string nullptr asserts to erase functions.
ClosedPublic

Authored by BillyONeal on May 18 2017, 2:38 PM.

Details

Summary

In my perf overhaul for MSVC++'s basic_string I wrote the null at data[oldsize] instead of data[newsize]; adding asserts to catch that bug.

Diff Detail

Event Timeline

BillyONeal created this revision.May 18 2017, 2:38 PM
EricWF accepted this revision.May 25 2017, 12:35 AM

Sorry for the delay reviewing such a simple change.

This revision is now accepted and ready to land.May 25 2017, 12:35 AM

@BillyONeal Changes like this are good for post-commit review (ie just commit it). Adding clearly correct assertions and test cases is never an objectionable thing.

BillyONeal closed this revision.May 25 2017, 12:03 PM

Sorry for the delay reviewing such a simple change.

No problem! Their simplicity also means no likely merge conflicts :)

@BillyONeal Changes like this are good for post-commit review (ie just commit it). Adding clearly correct assertions and test cases is never an objectionable thing.

Sounds good, thanks!