[PATCH] D108560: [clang-tidy] Add support for `NOLINTBEGIN` ... `NOLINTEND` comments

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 2 11:38:49 PST 2021

aaron.ballman added a comment.

In D108560#3167621 <https://reviews.llvm.org/D108560#3167621>, @ymandel wrote:

> Aaron, Salman,
> We've seen a serious perfomance regression caused by this patch. The issue is that the new code scans every file in its entirety for every single diagnostic encountered in that file. In fact, each lines is copied and scanned twice (respectively), so it's like O(n * m), n = size of files, m = number of diagnostics, with high constant factor.

Oof, good catch!

> Can we roll back this patch until a fix is developed? At the least, we'd request that this feature be disabled by default, either with a flag or in the preprocessor. Additionally, we'd ask you to reconsider the design to ensure that each file is processed at most once (via a cache or whatnot).  We'd be happy to review the patches.

I'm fine (if a bit sad) with reverting these changes until we have a better approach. @salman-javed-nz , can you look into that (either the revert or the fix)?

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list