[clang-tools-extra] [clang-tidy] Speed up/rewrite `bugprone-stringview-nullptr` (PR #192889)

Victor Chernyakin via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 10:33:36 PDT 2026


localspook wrote:

I wouldn't be against banning Transformer* checks. It's yet another layer of abstraction (which inevitably adds some  overhead) and yet another API to learn, and I just don't see what it's buying us. It doesn't provide any significant new _functionality,_ there's no part of the API that can't be directly translated into regular AST matcher-based code (I admit I'm not intimately familiar with Transformer, so if anyone believes I'm being ignorant here, do correct me). The only benefit I see is slightly more concise code, and I don't think that's enough of a justification.

A good experiment would be to rewrite a Transformer check to use AST matchers while (unlike this PR) preserving the general logic, and compare things like performance and LOC before and after.


\* That's the name of the RewriteRule API I believe

https://github.com/llvm/llvm-project/pull/192889


More information about the cfe-commits mailing list