[PATCH] D143851: [clang-tidy] Tweak 'rule of 3/5' checks to allow defaulting a destructor outside the class.

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 15 01:52:05 PST 2023


carlosgalvezp added a comment.

> That's not so simple. At work we use clang-tidy for few big projects. I had to explicitly add to some checks `unless(isExpansionInSystemHeader())` to gain some performance improvement of clang-tidy. This check is one of them.
> Problem is that some matchers or `check` methods in checks are heavy, and when you got lot of system headers (boost, STL, generated interfaces, message structs, ...) you may end up easily with hundreds of hidden issues from single translation unit.
> For some checks explicit exclude of system headers gives ~50% performance improvement, that result in faster CI feedback.
>
> Best would be to have something more generic like: if --system-headers is not used, then exclude code as early as possible, before even constructing diagnostic information.

Yes, I meant from a "diagnostic" point of view. I agree that performance-wise it's a lot of work that is discarded at the end and would be good to avoid as early as possible. This sounds like something all checks would benefit from, so finding a general solution to that problem would be good. I believe the best forum to discuss this would be an RFC in Discourse, make sure to tag @njames93 as Code Owner.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143851



More information about the cfe-commits mailing list