[PATCH] D134235: [clang-doc] Clean up *Info constructors.
Brett Wilson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 23 09:57:24 PDT 2022
brettw added inline comments.
================
Comment at: clang-tools-extra/clang-doc/Representation.h:202
+ bool IsFileInRootDir = false)
: LineNumber(LineNumber), Filename(std::move(Filename)),
IsFileInRootDir(IsFileInRootDir) {}
----------------
paulkirth wrote:
> do we still want to use `std::move` here now that its a StringRef? I don't think we would do that w/ `const char*`, which is what `StringRef` boils down to. It should be passed by value everywhere.
>
> see
> https://llvm.org/docs/ProgrammersManual.html#passing-strings-the-stringref-and-twine-classes,
> https://llvm.org/docs/ProgrammersManual.html#the-stringref-class
> https://llvm.org/docs/ProgrammersManual.html#string-like-containers
The move is unnecessary and I removed it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134235/new/
https://reviews.llvm.org/D134235
More information about the cfe-commits
mailing list