[PATCH] D22725: [clang-tidy] Add check 'misc-replace-memcpy'

Jonas Devlieghere via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 02:18:02 PDT 2016


JDevlieghere added a comment.

Thanks for the reviews everyone!

I'm currently still stuck on an issue I discovered when processing LLVM. I asked for help on the mailing list [0] but maybe someone here can help. Basically the issue is that sometimes pointers are passed to memcpy for which the types are not assignable. That's okay for memcpy because it takes its arguments as void pointers, but of course this causes std::copy to complain.

I want my pass to warn the user about this issue but skip the substitution, but I don't know how to check for this case...

[0] http://lists.llvm.org/pipermail/cfe-dev/2016-July/050105.html


https://reviews.llvm.org/D22725





More information about the cfe-commits mailing list