diff options
author | Sam McCall <sam.mccall@gmail.com> | 2022-10-05 22:23:10 +0200 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2022-10-06 11:38:55 +0200 |
commit | 5d2d527c32da2081b814ef8b446bc3e037f74b0a (patch) | |
tree | 7d8fe302cce5ea0b781fdfb2e9de5fc5dd09c7e2 /clang/unittests/Lex/LexerTest.cpp | |
parent | 7448f38898a8a0796fa66f1ebcd07c475f329dc4 (diff) | |
download | llvm-5d2d527c32da2081b814ef8b446bc3e037f74b0a.zip llvm-5d2d527c32da2081b814ef8b446bc3e037f74b0a.tar.gz llvm-5d2d527c32da2081b814ef8b446bc3e037f74b0a.tar.bz2 |
[clangd] Avoid scanning up to end of file on each comment!
Assigning char* (pointing at comment start) to StringRef was causing us
to scan the rest of the source file looking for the null terminator.
This seems to be eating about 8% of our *total* CPU!
While fixing this, factor out the common bits from the two places we're
parsing IWYU pragmas.
Differential Revision: https://reviews.llvm.org/D135314
Diffstat (limited to 'clang/unittests/Lex/LexerTest.cpp')
0 files changed, 0 insertions, 0 deletions