Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-tidy] Cache the locations of NOLINTBEGIN/END blocks
Support for NOLINT(BEGIN/END) blocks (implemented in D108560) is currently costly. This patch aims to improve the performance with the following changes: - The use of tokenized NOLINTs instead of a series of repetitive ad-hoc string operations (`find()`, `split()`, `slice()`, regex matching etc). - The caching of NOLINT(BEGIN/END) block locations. Determining these locations each time a new diagnostic is raised is wasteful as it requires reading and parsing the entire source file. Move NOLINT-specific code from `ClangTidyDiagnosticConsumer` to new purpose-built class `NoLintDirectiveHandler`. Differential Revision: https://reviews.llvm.org/D116085
- Loading branch information
1 parent
9b6c2ea
commit 19eaad9
Showing
25 changed files
with
752 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.