[PATCH] D116328: [ast-matchers] Add hasSubstatement() traversal matcher for caseStmt(), defaultStmt(), labelStmt()

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 13 12:17:20 PST 2022


aaron.ballman added a comment.

In D116328#3241486 <https://reviews.llvm.org/D116328#3241486>, @LegalizeAdulthood wrote:

> In D116328#3241329 <https://reviews.llvm.org/D116328#3241329>, @aaron.ballman wrote:
>
>> In D116328#3223344 <https://reviews.llvm.org/D116328#3223344>, @LegalizeAdulthood wrote:
>>
>>> My takeaway:
>>>
>>> - if `has` isn't expensive, I can either ditch this public matcher or move it to be a private matcher used in my check
>>
>> [...] if you profiled something and notice a measurable difference
>> between `has()` and `hasSubstatement()` in practice, that would
>> be really good for the community to know.
>
> Do we have some sort of benchmarking facility in place, or do I
> have to homebrew something?

I've always homebrewed it, but if we have better facilities these days, I'd love to know about them!


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

https://reviews.llvm.org/D116328



More information about the cfe-commits mailing list