[PATCH] D124524: [demangler] Avoid nullptr UB

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 11:09:56 PDT 2022


dblaikie added a comment.

Yeah, I'd go with the fix at memcpy in D122604 <https://reviews.llvm.org/D122604> instead.

I appreciate the argument from `string_view`'s API design - though even `string_view` can be over `nullptr`, but can't be constructed with a null pointer (its default constructor creates a `{nullptr, 0}` `string_view`) so arguably the caller should be able to handle a null `string_view`.


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

https://reviews.llvm.org/D124524



More information about the llvm-commits mailing list