[PATCH] D89852: [clangd] Use SmallString instead of std::string in marshalling code; NFC
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 22 01:47:28 PDT 2020
njames93 added a comment.
I'm a little concerned by this, not sure if `Expected` and `Optional` play nicely with rvo. If the compiler can't optimise it's potentially a 256 byte memcpy in the return, granted that would still be cheaper than dynamic allocation. However it would most likely be faster if the functions took a reference to the `SmallString` (or more likely `SmallVectorImpl<char>`) and returned an `llvm::Error` or `bool`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89852/new/
https://reviews.llvm.org/D89852
More information about the cfe-commits
mailing list