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%.
Details
Diff Detail
Event Timeline
lg
include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
450 | What is this needed for? I'd prefer if we could get rid of it, but if not, it should have a comment explaining it (so we can take it out if we don't need it any more). |
Added comment
include/clang/ASTMatchers/ASTMatchersInternal.h | ||
---|---|---|
450 | Matcher(DynTypedMatcher) is private because it is essentially "unsafe". You can easily create a matcher that matches nothing. |
What is this needed for? I'd prefer if we could get rid of it, but if not, it should have a comment explaining it (so we can take it out if we don't need it any more).