[PATCH] D50966: Fix an undefined behavior when storing an empty StringRef.
Joerg Sonnenberger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 06:28:34 PDT 2018
joerg added a comment.
Why do we need to allocate memory in this case at all? I.e. why can't this just be:
if (S.empty())
return StringRef("", 0);
...
Repository:
rL LLVM
https://reviews.llvm.org/D50966
More information about the llvm-commits
mailing list