[PATCH] Speed up hasName() matcher.

Samuel Benzaquen sbenza at google.com
Tue Oct 14 09:04:40 PDT 2014


Hi klimek,

Speed up hasName() matcher by skipping the expensive generation of the
fully qualified name unless we need it.
In the common case of matching an unqualified name, we don't need to
generate the full name. We might not even need to copy any string at
all.
This change speeds up our clang-tidy benchmark by ~10%

http://reviews.llvm.org/D5776

Files:
  include/clang/ASTMatchers/ASTMatchers.h
  include/clang/ASTMatchers/ASTMatchersInternal.h
  lib/ASTMatchers/ASTMatchersInternal.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5776.14871.patch
Type: text/x-patch
Size: 4222 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141014/c505e0e3/attachment.bin>


More information about the cfe-commits mailing list