NoQ added a comment. Looks good, minor comments :)
================ Comment at: lib/Analysis/CloneDetection.cpp:99 @@ +98,3 @@ + /// Every item in this list is unique. + std::vector<const VarDecl *> Variables; + ---------------- I've a feeling this is essentially a `map<const VarDecl *, size_t>`, because that harmonizes with our access patterns (lookup number by variable, insert the new value `Variables.size()` if not found). So i think a map would express the intention more clearly. ================ Comment at: lib/Analysis/CloneDetection.cpp:168 @@ +167,3 @@ + assert(Other.Occurences.size() == Occurences.size()); + for (unsigned i = 0; i < Occurences.size(); ++i) { + if (Occurences[i].KindID != Other.Occurences[i].KindID) { ---------------- Because your code uses a lot of fancy C++11, i'd probably suggest to make it even prettier with `std::all_of()`. https://reviews.llvm.org/D22982 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits