[PATCH] D151260: [Demangle] avoid more std::string_view::substr

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 14:51:07 PDT 2023


nickdesaulniers added inline comments.


================
Comment at: libcxxabi/src/demangle/StringViewExtras.h:25
+inline bool starts_with(std::string_view self, char C) noexcept {
   return !self.empty() && self.front() == C;
 }
----------------
nickdesaulniers wrote:
> `front` is not `noexcept`. Should I rewrite this to be `&*self == C`?
https://en.cppreference.com/w/cpp/string/basic_string_view/front


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151260/new/

https://reviews.llvm.org/D151260



More information about the llvm-commits mailing list