[PATCH] D20795: Added basic capabilities to detect source code clones.

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 22 12:31:47 PDT 2016


v.g.vassilev accepted this revision.
v.g.vassilev added a comment.
This revision is now accepted and ready to land.

LGTM, given the comments are addressed.


================
Comment at: include/clang/Analysis/CloneDetection.h:37
@@ +36,3 @@
+  /// Stmt, then S is a pointer to this Stmt.
+  Stmt const *S;
+
----------------
It is more common in the codebase to use Did you mean `const Stmt *S`. Could you update all similar occurrences to it?

================
Comment at: lib/Analysis/CloneDetection.cpp:119
@@ +118,3 @@
+  /// \brief Retrieves the CloneSignature that describes the given Sequence.
+  CloneDetector::CloneSignature get(StmtSequence const &S) const {
+    // This cache promises good lookup time for recently added CloneSignatures
----------------
Same here `const StmtSequence &S` is the common style in the codebase.


https://reviews.llvm.org/D20795





More information about the cfe-commits mailing list