NoQ accepted this revision. This revision is now accepted and ready to land.
================ Comment at: lib/Analysis/CloneDetection.cpp:99 @@ +98,3 @@ + /// Every item in this list is unique. + std::vector<const VarDecl *> Variables; + ---------------- NoQ wrote: > 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. Discussed that we're going to have lookups in both directions in the next patch. ================ 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) { ---------------- NoQ wrote: > Because your code uses a lot of fancy C++11, i'd probably suggest to make it > even prettier with `std::all_of()`. Uhm, never mind, iterating two arrays here. https://reviews.llvm.org/D22982 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits