[PATCH] Fix isInstantiated and isInTemplateInstantiation to not recreate the matchers on each call.
Samuel Benzaquen
sbenza at google.com
Mon Dec 8 09:07:20 PST 2014
Hi klimek,
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%.
http://reviews.llvm.org/D6564
Files:
include/clang/ASTMatchers/ASTMatchers.h
include/clang/ASTMatchers/ASTMatchersInternal.h
include/clang/ASTMatchers/ASTMatchersMacros.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6564.17039.patch
Type: text/x-patch
Size: 4062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141208/2d321887/attachment.bin>
More information about the cfe-commits
mailing list