[PATCH] Refactor Matcher<T> and DynTypedMatcher to reduce overhead of casts.

Samuel Benzaquen sbenza at google.com
Mon Sep 29 10:54:22 PDT 2014


================
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:290-292
@@ +289,5 @@
+  ///
+  /// Different matchers might have the same \c Implementation pointer with a
+  /// different \c RestrictKind, so we need to include both in the ID.
+  /// \c MatcherIDType supports operator< and provides strict weak ordering.
+  typedef std::pair<ast_type_traits::ASTNodeKind, uint64_t> MatcherIDType;
----------------
klimek wrote:
> Can you give an example in the comment? I find it not trivial to reason about the actual cases this affects.
How about now?

http://reviews.llvm.org/D5485






More information about the cfe-commits mailing list