]> granicus.if.org Git - clang/commit
Filter the toplevel matchers by kind.
authorSamuel Benzaquen <sbenza@google.com>
Mon, 24 Nov 2014 21:21:09 +0000 (21:21 +0000)
committerSamuel Benzaquen <sbenza@google.com>
Mon, 24 Nov 2014 21:21:09 +0000 (21:21 +0000)
commit6d49f699dca8743f419850cc120ca0b7c9c45f32
tree156d8f9aaaadc7a771e64afea53f99a49964a7ea
parent23c0fcee359d1252681c271315b60e17e6018889
Filter the toplevel matchers by kind.

Summary:
Filter the toplevel matchers by kind.
Decl and Stmt matchers are tied to a specific node kind and trying to
match incompatible nodes is a waste.
Precalculate a filtered list of matchers that have a chance of matching
the node and ignore the rest.
Speeds up our clang-tidy benchmark by ~10%

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222688 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTTypeTraits.h
include/clang/ASTMatchers/ASTMatchFinder.h
include/clang/ASTMatchers/ASTMatchersInternal.h
lib/ASTMatchers/ASTMatchFinder.cpp
lib/ASTMatchers/ASTMatchersInternal.cpp