NoQ added a comment.

Uhm. I've a feeling that now i realize how it should have been written from the 
start. That's a pretty bad feeling to have.

I wish we had a //series of passes//. Before the first pass, all statements are 
considered equivalent. After the first pass, they're split into smaller clone 
groups. The second pass would add further distinction between items in each 
clone group, producing more clone groups. Etc. Every subsequent pass would 
compute more performance-intensive properties of statement sequences (the first 
pass being very simple, eg. only statement kinds). Once all passes end, only 
true positives remain. Probably wrap up each pass into a class that conforms to 
some common interface, and we're done with a nicely structured and 
easy-to-extend copy-paste error detection framework. We could probably even 
allow the user to turn separate passes on and off through some kind of dynamic 
registry.

Never mind though, will have a look at what we have :)


https://reviews.llvm.org/D22982



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

Reply via email to