Trass3r added a comment.

In D135690#3852362 <https://reviews.llvm.org/D135690#3852362>, @aaron.ballman 
wrote:

> what's the need for adding this matcher? Do you plan to use it for some 
> in-tree needs? We usually only add new matchers where there's an immediate 
> need for them because of how expensive AST matchers are to compile (and each 
> matcher adds a fair number of template instantiations to the final binary as 
> well, so there's a bit of runtime cost too).

Didn't realize it has a big cost. Looking inside the `AST_MATCHER` and 
`REGISTER_MATCHER` macros I can't see any unique instantiations, should be 
memoized?
I created it a while ago for use in a clang-tidy check. Oddly I can't find that 
code right now.
It might have been for finding inline ctors/dtors: 
https://github.com/llvm/llvm-project/issues/51577.
https://chromium.googlesource.com/chromium/src/tools/clang/+/refs/heads/main/plugins/FindBadConstructsConsumer.cpp#495


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135690/new/

https://reviews.llvm.org/D135690

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to