[PATCH] D40731: Integrate CHash into CLang
Johannes Altmanninger via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 4 05:54:15 PST 2017
johannes added a comment.
In https://reviews.llvm.org/D40731#943469, @stettberger wrote:
> @Eugene.Zelenko Thank you for pointing me out on these issues. I ran clang-tidy and clang-format on CHashVisitor.h
>
> @rsmith You're right, there is already more than one implemenation of {partial,unstable} AST hashes within LLVM, as we already discussed on cfe-dev in August[1]. Therefore, I rewrote our original CHash implementation to extend the already existing StmtDataCollectors approach. However, you are right, efforts should be coordinated to get a AST hashing implementation that can be adapted to various use-case scenarios.
>
> [1] http://lists.llvm.org/pipermail/cfe-dev/2017-August/054911.html
I think it would be quite nice if we manage to consolidate the implementation of hashing mechanisms.
Modifications to StmtDataCollectors.td will alter the behaviour of clone detection. Currently, this file assumes that we want to find type 2 clones. So we should maintain that, and add things only where needed.
I submitted this patch so we can have different categories of data collection
https://reviews.llvm.org/D40781
Repository:
rC Clang
https://reviews.llvm.org/D40731
More information about the cfe-commits
mailing list