[PATCH] D148353: [StringView] remove ctor incompatible with std::string_view
Erich Keane via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 10:55:35 PDT 2023
erichkeane added inline comments.
================
Comment at: llvm/include/llvm/Demangle/Utility.h:67
- return operator+=(StringView(TempPtr, Temp.data() + Temp.size()));
}
----------------
nickdesaulniers wrote:
> This is the change that's breaking the tests...
`TempPtr` is not necessarily the Temp.data location, it looks like it is modified a h andful of times on line 59 and 65.
So this is meant to be a 'rest' kinda thing, but the code you changed it to is using the whole 'size'. I think you need to make `Temp.size()` be `Temp.size() - std::distance(Temp.data(), TempPtr);` (check for off-by-1 please :D).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148353/new/
https://reviews.llvm.org/D148353
More information about the llvm-commits
mailing list