[PATCH] D98792: [ASTMatchers][NFC] Use move semantics when passing matchers around.

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 17 10:01:18 PDT 2021


njames93 created this revision.
njames93 added reviewers: klimek, aaron.ballman, steveire.
Herald added a subscriber: pengfei.
njames93 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Changing matchers to use non-const members and adding r-value overloads of matcher conversions enables move optimisations.
I don't have performance figures but I can say this knocked 120k from the clang-tidy binary(86k was from the .text section) on a Release with assertions build(x86_64-unknown-linux-gnu).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98792

Files:
  clang/include/clang/ASTMatchers/ASTMatchersInternal.h
  clang/include/clang/ASTMatchers/ASTMatchersMacros.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98792.331298.patch
Type: text/x-patch
Size: 16341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210317/50738a31/attachment-0001.bin>


More information about the cfe-commits mailing list