[PATCH] Special case 0 and 1 matcher in makeAllOfComposite().

Samuel Benzaquen sbenza at google.com
Wed Oct 8 10:05:41 PDT 2014


Hi klimek,

Remove unnecessary wrapping for the 0 and 1 matcher cases of
makeAllOfComposite(). We don't need a variadic wrapper for those cases.
Refactor TrueMatcher to take advandage of the new conversions between
DynTypedMatcher and Matcher<T>. Also, make it a singleton.
This change improves our clang-tidy related benchmarks by ~12%.

http://reviews.llvm.org/D5675

Files:
  include/clang/ASTMatchers/ASTMatchers.h
  include/clang/ASTMatchers/ASTMatchersInternal.h
  lib/ASTMatchers/ASTMatchersInternal.cpp
  unittests/ASTMatchers/Dynamic/ParserTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5675.14581.patch
Type: text/x-patch
Size: 8003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141008/471ccfc0/attachment.bin>


More information about the cfe-commits mailing list