[PATCH] D39644: [clang-diff] Use references to Node instead of NodeId

Johannes Altmanninger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 5 10:51:52 PST 2017


johannes created this revision.
Herald added a subscriber: klimek.

This adds to each node a reference to its syntax tree. As a result,
instead of passing around the tree plus the node ID, we just use a
reference to the node. This removes some potential for errors. Users
will almost always use node references and are oblivious of their IDs.

Iterating through lists of Nodes is provided by NodeRefIterator


https://reviews.llvm.org/D39644

Files:
  include/clang/Tooling/ASTDiff/ASTDiff.h
  include/clang/Tooling/ASTDiff/ASTDiffInternal.h
  lib/Tooling/ASTDiff/ASTDiff.cpp
  tools/clang-diff/ClangDiff.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39644.121632.patch
Type: text/x-patch
Size: 41585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171105/080836f0/attachment-0001.bin>


More information about the cfe-commits mailing list