[PATCH] D22982: [CloneDetector] No longer reporting clones that don't have a common referenced variable pattern.

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 02:45:45 PDT 2016

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 :)


More information about the cfe-commits mailing list