The standard requires comparisons of pointers to unrelated storage to
use std::less. Split out some helpers that do that and update all the
code that was comparing using < and friends (mostly assertions).
Details
Details
- Reviewers
dblaikie - Commits
- rG5ccff5aaa68a: ADT: Fix pointer comparison UB in SmallVector
Diff Detail
Diff Detail
Event Timeline
llvm/include/llvm/ADT/SmallVector.h | ||
---|---|---|
636 | Note that this assertion (and a couple of others) would start firing on I == this->end(), but in each case that has been handled by an early return. |
Comment Actions
Thanks for the review! Committed with your suggestions in 5ccff5aaa68ab789834c4463ce05b05e57593b34.
clang-format: please reformat the code