stettberger added inline comments.
Comment at: include/clang/AST/CHashVisitor.h:72-79
+ template
+ void addData(const llvm::iterator_range &x) {
+addData(std::distance(x.begin(), x.end()));
+ }
+ template
+ void addData(const llvm::ArrayRef &x) {
+addData(x.size());
stettberger updated this revision to Diff 138019.
stettberger marked an inline comment as done.
stettberger added a comment.
Addressed comments, for more details, please see the mail on cfe-devel
Repository:
rC Clang
https://reviews.llvm.org/D40731
Files:
include/clang/AST/AttrDataCollecto
stettberger updated this revision to Diff 135598.
stettberger added a comment.
[CHash] Stable TU-level AST Hashing for local and global hashes
This patch does integrate the AST hashing parts of the CHash project[1][2] into
CLang. The extension provided by this patch accomplishes 2 things:
- loca
stettberger updated this revision to Diff 135227.
stettberger added a comment.
Rebased to HEAD, Run (external) clang-hash testsuite and ASTTest
Repository:
rC Clang
https://reviews.llvm.org/D40731
Files:
include/clang/AST/AttrDataCollectors.td
include/clang/AST/CHashVisitor.h
include/c
stettberger updated this revision to Diff 126925.
stettberger added a comment.
@rtrieu: Fixed the checking of Decl::hasAttrs() before using Decl::attrs()
Repository:
rC Clang
https://reviews.llvm.org/D40731
Files:
include/clang/AST/AttrDataCollectors.td
include/clang/AST/CHashVisitor.h
stettberger updated this revision to Diff 126523.
stettberger added a comment.
I removed the magic constants and added the number of children for various AST
nodes. This should avoid hash collisions.
Repository:
rC Clang
https://reviews.llvm.org/D40731
Files:
include/clang/AST/AttrDataCol
stettberger added a comment.
For my changes to StmtDataCollectors: I tried to leave the already existing
entries in StmtDataCollector.td untouched and the test-cases still work OK. If
there is something somebody could break by changing these files it would be
good to have a test case for it.
H
stettberger updated this revision to Diff 125309.
stettberger marked 9 inline comments as done.
stettberger added a comment.
@Eugene.Zelenko Thank you for pointing me out on these issues. I ran clang-tidy
and clang-format on CHashVisitor.h
@rsmith You're right, there is already more than one imp
stettberger created this revision.
Herald added subscribers: cfe-commits, aprantl, mgorny.
The CHashVisitor can be used to determine a unique hash for a translation unit.
The hash is stable across compiler invocations and if two translation units
have the same hash, the resulting object file is