[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 18 07:19:40 PDT 2019


lebedev.ri added a comment.

Still missing tests



================
Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceMemcpyByStdCopy.cpp:34-35
+      callExpr(hasDeclaration(functionDecl(hasName("memcpy"),
+                                           isExpansionInSystemHeader())),
+               isExpansionInMainFile())
+          .bind("memcpy_function");
----------------
Why these restrictions?


================
Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceMemcpyByStdCopy.h:26
+  ReplaceMemcpyByStdCopy(StringRef Name, ClangTidyContext *Context);
+  ~ReplaceMemcpyByStdCopy() override = default;
+  void registerMatchers(ast_matchers::MatchFinder *Finder) override;
----------------
I don't think you need this one


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

https://reviews.llvm.org/D63324





More information about the cfe-commits mailing list