]> granicus.if.org Git - clang/commit
Separate the matchers by type and statically dispatch to the right list.
authorSamuel Benzaquen <sbenza@google.com>
Fri, 5 Sep 2014 20:15:31 +0000 (20:15 +0000)
committerSamuel Benzaquen <sbenza@google.com>
Fri, 5 Sep 2014 20:15:31 +0000 (20:15 +0000)
commit648414aebd1ececf2263096ef7fc203fcce37800
tree0805c5e7f60add9b5966c839fefb073f4103149c
parent263a25d5ce3d0241f87cd104b41da7a40422b54c
Separate the matchers by type and statically dispatch to the right list.

Summary:
Separate the matchers by type and statically dispatch to the right list.
For any node type that we support, it reduces the number of matchers we
run it through.
For node types we do not support, it makes match() a noop.
This change improves our clang-tidy related benchmark by ~30%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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