Towards replacing llvm::StringView with std::string_view, remove ctor
that std::string_view doesn't have an analog for.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/Demangle/Utility.h | ||
---|---|---|
67 | This is the change that's breaking the tests... |
llvm/include/llvm/Demangle/Utility.h | ||
---|---|---|
67 | probably should be Temp.data() + Temp.size() - TempPtr |
llvm/include/llvm/Demangle/Utility.h | ||
---|---|---|
67 | 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). |
llvm/include/llvm/Demangle/Utility.h | ||
---|---|---|
67 |
was there some additional check you wanted me to add here? |
llvm/include/llvm/Demangle/Utility.h | ||
---|---|---|
67 | Ah, no, just check for an off-by-1 error in my suggestion (don't just use it). |
llvm/include/llvm/Demangle/Utility.h | ||
---|---|---|
67 | LGTM |
size_t n = std::distance(First, Last); can be removed.