NoQ added a comment.

Congrats on the fantastic hack that nobody else noticed! I've a feeling we 
cannot add tests for that, because any test would quickly break if we change 
the hash, though demonstrating that we fixed the problem would still be cool 
(eg. take two unsupported expressions of different kind but same type, and show 
that they're no longer reported).

One more minor comment.


================
Comment at: lib/Analysis/CloneDetection.cpp:127
@@ +126,3 @@
+    // Initialize the last bytes that are maybe not fully overwritten.
+    CollectedData.back() = 0;
+
----------------
I think `resize()` zero-initializes the whole new data(?)

================
Comment at: lib/Analysis/CloneDetection.cpp:142
@@ +141,3 @@
+    CODE;                                                                      
\
+    ConstStmtVisitor<StmtDataCollector>::Visit##CLASS(S);                      
\
+  }
----------------
This is... Beautiful... o________o
/Approves.


https://reviews.llvm.org/D22514



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

Reply via email to