llvm-project/clang/lib/ASTMatchers
Samuel Benzaquen 95636e565a Make the function pointer a template argument instead of a runtime value.
Summary:
Speed up the variadic matchers by removing one indirect call.
Making the function pointer a template arguments allows the compiler to
inline the call instead of doing an runtime call by pointer.
Also, optimize the allOf() case to avoid redundant kind checks.
This speeds up our clang-tidy benchmark by ~2%

Reviewers: klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D6424

llvm-svn: 223029
2014-12-01 14:46:14 +00:00
..
Dynamic Re-apply r222646 (was reverted in r222667). Adding 4 ASTMatchers: typedefDecl, isInMainFile, isInSystemFile, isInFileMatchingName 2014-11-25 17:01:06 +00:00
ASTMatchFinder.cpp Filter the toplevel matchers by kind. 2014-11-24 21:21:09 +00:00
ASTMatchersInternal.cpp Make the function pointer a template argument instead of a runtime value. 2014-12-01 14:46:14 +00:00
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Makefile First revision of the dynamic ASTMatcher library. 2013-05-14 09:13:00 +00:00