v.g.vassilev added a comment.

I am not sure if this is the right time but maybe testing and comparing the 
behavior of this patch against something such as the ODRHash will help you, me 
(and probably others) to understand the current patch better.

In https://reviews.llvm.org/D41416, I started working on lazy deserialization 
of template specializations. When you produce a PCM or PCH and a template 
instantiation is required it'd currently deserialize eagerly all possible 
template specializations (and standard libraries have a lot of them). I am 
computing the hashes of the template arguments and comparing against the usual 
Profile-ed hashes. In the assert, essentially I am comparing the behavior of 
the ODRHash and the Stmt::Profile logic for some cases.

Perhaps you can plugin your algorithm to it, create a pch and start comparing 
your logic with the when it comes to template arguments hashing and alike.

Of course this is not something that will give you perfect coverage and so on 
but it can stress test the implementation and compare it to the 2 major 
existing ones in clang.



================
Comment at: include/clang/AST/CHashVisitor.h:10
+//
+//  This file defines the APValue class.
+//
----------------
I suspect this is a copy-paste from the APValue class. Could you update the 
documentation what the file contains?


================
Comment at: include/clang/AST/CHashVisitor.h:291
+
+  /*****************************************************************
+   * In order to produce hashes for subtrees on the way, a hash
----------------
Clang uses `///` for doxygen style documentation.


Repository:
  rC Clang

https://reviews.llvm.org/D40731



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

Reply via email to