Skip to content
Commit 96a39a5a authored by Samuel Benzaquen's avatar Samuel Benzaquen
Browse files

Fix isInstantiated and isInTemplateInstantiation to not recreate the matchers on each call.

Summary:
Store the result matcher after the first call and reuse it later on.
Recreating the matchers just to use them once incurs in a lot of
unnecessary temporary memory allocations.
This change speeds up our clang-tidy benchmarks by ~2%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 223690
parent ac4744ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment