klimek added a comment.

In D82771#2121924 <https://reviews.llvm.org/D82771#2121924>, @hokein wrote:

> In D82771#2120214 <https://reviews.llvm.org/D82771#2120214>, @klimek wrote:
>
> > In what situation are we calling child matchers repeatedly with the same 
> > matcher on the same node?
>
>
> I guess a pattern like 
> https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp#L29-L40?


Ah, so this is when we go hasDeclaration.

I'm wondering whether what we really want to memoize are matchers that go 
across the AST, like hasType, hasDeclaration, etc, where we can expect a linear 
number of nodes hitting that  matcher.

hasChild specifically seems weird to memoize when we don't memoize other has 
matchers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82771



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

Reply via email to