johannes marked an inline comment as done.
johannes added a comment.

In https://reviews.llvm.org/D34329#796574, @teemperor wrote:

> I didn't have time to have a close look at this patch, but it seems you're 
> interested in the specific TU-independent data of a Stmt to compare them. So 
> if you are interested in such data and don't want to write your own function 
> to collect it for each Stmt subclass, there is the `StmtDataCollector` in the 
> CloneDetection.cpp here 
> <https://clang.llvm.org/doxygen/CloneDetection_8cpp_source.html#l00139> and a 
> example how to use it is here 
> <https://clang.llvm.org/doxygen/CloneDetection_8cpp_source.html#l00482>.
>
> I'm fine with moving this into a header and make it more usable for this use 
> case if you think it makes sense to use it here. The main advantage would be 
> that we don't get yet another of these classes in clang (we already have 3 of 
> them: One in the Stmt profiler code, another one in the ODRHash code for 
> modules and another one in the CloneDetection code).


Looking at this again now, it seems to make sense to consolidate this. It 
collects a lot of data I currently don't.
Does it include the values of literals / identifiers? It seems not (since it is 
geared towards detecting structural clones only).  So we could make that 
optional, or I could do that myself.


https://reviews.llvm.org/D34329



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to