[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

Ben Barham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 21:24:37 PDT 2023


bnbarham added a comment.

> Are there other users of incremental processing mode, other than the REPL / IncrementalParser?

It seems Swift's clang importer also uses incremental processing mode, I'm assuming to keep the `TUScope` and `CurLexer` alive after EOF. We also end up using the same context with various actions, which leads to a few hangs as there's various checks for `eof` only, eg. `ReadPCHAndPreprocessAction`, `PreprocessOnlyAction`, and `RewriteIncludesAction`. There's also quite a few places in the parser that only check for `eof` as well (I just grepped for `Tok.isNot(tok::eof)`).

Should these all be updated to handle `annot_repl_input_end` or should we instead have a different flag that we set for this purpose instead of co-opting `isIncrementalProcessingEnabled`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148997/new/

https://reviews.llvm.org/D148997



More information about the cfe-commits mailing list