junaire added inline comments.

================
Comment at: clang/lib/Interpreter/IncrementalParser.cpp:162
+  if (P->getCurToken().is(tok::annot_repl_input_end)) {
+    P->ConsumeAnyToken();
     // FIXME: Clang does not call ExitScope on finalizing the regular TU, we
----------------
rsmith wrote:
> 
Sorry but that's a private member function so I can't do that. Should I make it 
public?


================
Comment at: clang/lib/Parse/Parser.cpp:620-621
   // processing
-  if (PP.isIncrementalProcessingEnabled() && Tok.is(tok::eof))
-    ConsumeToken();
+  if (PP.isIncrementalProcessingEnabled() && Tok.is(tok::annot_repl_input_end))
+    ConsumeAnnotationToken();
 
----------------
rsmith wrote:
> Do we need to do this here? `IncrementalParser` already seems to take care of 
> this, and the logic here would be easier to reason about if `Parser` never 
> steps past an `annot_repl_input_end` token, and such tokens instead are only 
> ever consumed by the REPL.
> 
> Are there other users of incremental processing mode, other than the REPL / 
> `IncrementalParser`?
Make sense to me, I'll remove it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148997

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to