]> granicus.if.org Git - clang/commit
Special case 0 and 1 matcher in makeAllOfComposite().
authorSamuel Benzaquen <sbenza@google.com>
Thu, 9 Oct 2014 19:28:18 +0000 (19:28 +0000)
committerSamuel Benzaquen <sbenza@google.com>
Thu, 9 Oct 2014 19:28:18 +0000 (19:28 +0000)
commite136c9dba2063de9b90da23b9a9807257a91b4f9
tree3869b2e8c3cfa84eb6fbfd61ef43e13e6cf24453
parent74871aec93e058343c3497b3b4e89c077d158c79
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
include/clang/ASTMatchers/ASTMatchers.h
include/clang/ASTMatchers/ASTMatchersInternal.h
lib/ASTMatchers/ASTMatchersInternal.cpp
unittests/ASTMatchers/Dynamic/ParserTest.cpp