aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/Architecture.cpp
diff options
context:
space:
mode:
authorSalman Javed <mail@salmanjaved.org>2022-01-26 23:56:27 +1300
committerSalman Javed <mail@salmanjaved.org>2022-01-27 00:12:16 +1300
commit19eaad94c47f92dd23989b0b6832bb6751dde979 (patch)
tree0d2a3fd351ed4728d21fd9a487e14ceeb8d28f00 /llvm/lib/TextAPI/Architecture.cpp
parent9b6c2ea30219c16c264eaa38609e324470e2ad07 (diff)
downloadllvm-19eaad94c47f92dd23989b0b6832bb6751dde979.zip
llvm-19eaad94c47f92dd23989b0b6832bb6751dde979.tar.gz
llvm-19eaad94c47f92dd23989b0b6832bb6751dde979.tar.bz2
[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
Diffstat (limited to 'llvm/lib/TextAPI/Architecture.cpp')
0 files changed, 0 insertions, 0 deletions