[PATCH] D142939: Fix handling of -> calls for modernize-use-emplace

Peter Wolf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 1 11:19:49 PST 2023


BigPeet added a comment.

> Generally we use prefer `llvm::ArrayRef` over `const std::vector &`

I will keep this in mind. Or should this be fixed in this revision?

Anyway, if this gets merged, my username/mail are

GitHub username: BigPeet
GitHub email: pwolf2310 at gmail.com

Thanks for the fast review response!



================
Comment at: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp:93
+// Matches if the node has canonical type matching any of the given names.
+auto hasWantedType(const std::vector<StringRef> &TypeNames) {
+  return hasCanonicalType(hasDeclaration(cxxRecordDecl(hasAnyName(TypeNames))));
----------------
njames93 wrote:
> Generally we use prefer `llvm::ArrayRef` over `const std::vector &`
> Generally we use prefer `llvm::ArrayRef` over `const std::vector &`




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142939



More information about the cfe-commits mailing list