Special case 0 and 1 matcher in makeAllOfComposite().
Summary: 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%. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D5675 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219431 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/ASTMatchers/ASTMatchers.h 1 addition, 4 deletionsinclude/clang/ASTMatchers/ASTMatchers.h
- include/clang/ASTMatchers/ASTMatchersInternal.h 38 additions, 45 deletionsinclude/clang/ASTMatchers/ASTMatchersInternal.h
- lib/ASTMatchers/ASTMatchersInternal.cpp 25 additions, 0 deletionslib/ASTMatchers/ASTMatchersInternal.cpp
- unittests/ASTMatchers/Dynamic/ParserTest.cpp 4 additions, 1 deletionunittests/ASTMatchers/Dynamic/ParserTest.cpp
Loading
Please register or sign in to comment