[cfe-commits] [PATCH] Modifying BoundNodes to store bindings as void* pointers and use getNodeAs instead of getDeclAs and getStmtAs.

Michael Diamond reviews at llvm-reviews.chandlerc.com
Thu Aug 23 11:09:49 PDT 2012


Hi klimek,

Moved to storing a pair of void* and NodeBaseType which will allow us to safely determine at runtime whether a given node (stored as void*) can be cast to the type the user requests when calling getNodeAs. This logic is hidden inside a new internal class, BoundNodesMap. The result of this is that we can add support for binding any base node type with very little effort. This change also adds support for binding QualType (in BoundNodes).

http://llvm-reviews.chandlerc.com/D25

Files:
  google3/third_party/llvm/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h
  google3/third_party/llvm/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
  google3/third_party/llvm/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25.1.patch
Type: text/x-patch
Size: 13770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120823/dc3651ae/attachment.bin>


More information about the cfe-commits mailing list