[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

Jun Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 31 03:22:45 PDT 2023


junaire marked 3 inline comments as done.
junaire added inline comments.


================
Comment at: clang/lib/Interpreter/IncrementalParser.cpp:162
+  if (P->getCurToken().is(tok::annot_input_end)) {
+    P->ConsumeAnyToken();
     // FIXME: Clang does not call ExitScope on finalizing the regular TU, we
----------------
v.g.vassilev wrote:
> Why `ConsumeToken` is not sufficient for an `annot_input_end`?
No, we can't. `ConsumeToken` can't eat special tokens. See https://github.com/llvm/llvm-project/blob/fc6e91fe8184129d2395b79ce42f4495b95b0d0d/clang/include/clang/Parse/Parser.h#L494-L501


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141215



More information about the cfe-commits mailing list