[PATCH] D142939: Fix handling of -> calls for modernize-use-emplace
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 1 09:47:16 PST 2023
njames93 accepted this revision.
njames93 added a comment.
LGTM
================
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))));
----------------
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