To fix expensive check builds that were failing when using MSVC's
std::string_view::iterator::operator*, I added a few expressions like
&*std::string_view::begin. @nico pointed out that this is literally the
same thing and more clearly expressed as std::string_view::data.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM -- this would fail with libc++ bounded iterators as well, since you might end up dereferencing a past-the-end iterator in case the string is empty.
llvm/lib/Demangle/MicrosoftDemangle.cpp | ||
---|---|---|
2408 | I think you no longer need the .empty() check once you use data(). If Name _is_ empty, then *Name.begin() is I think UB, but Name.data() isn't. |
I think you no longer need the .empty() check once you use data(). If Name _is_ empty, then *Name.begin() is I think UB, but Name.data() isn't.