[PATCH] Refactor Matcher<T> and DynTypedMatcher to reduce overhead of casts.
Manuel Klimek
klimek at google.com
Mon Sep 29 10:38:32 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;
----------------
Can you give an example in the comment? I find it not trivial to reason about the actual cases this affects.
http://reviews.llvm.org/D5485
More information about the cfe-commits
mailing list