[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
Loading
Please sign in to comment