aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Interpreter/InterpreterTest.cpp
diff options
context:
space:
mode:
authorJun Zhang <jun@junz.org>2023-05-16 20:10:43 +0800
committerJun Zhang <jun@junz.org>2023-05-16 20:10:43 +0800
commit247fa04116a6cabf8378c6c72d90b2f705e969de (patch)
tree81f2b6d649963bbc6cbf6239836380c95a6891ee /clang/unittests/Interpreter/InterpreterTest.cpp
parent8a5450d322c0748d3ee35d66d0d85046b5172538 (diff)
downloadllvm-247fa04116a6cabf8378c6c72d90b2f705e969de.zip
llvm-247fa04116a6cabf8378c6c72d90b2f705e969de.tar.gz
llvm-247fa04116a6cabf8378c6c72d90b2f705e969de.tar.bz2
[clang] Add a new annotation token: annot_repl_input_end
This patch is the first part of the below RFC: https://discourse.llvm.org/t/rfc-handle-execution-results-in-clang-repl/68493 It adds an annotation token which will replace the original EOF token when we are in the incremental C++ mode. In addition, when we're parsing an ExprStmt and there's a missing semicolon after the expression, we set a marker in the annotation token and continue parsing. Eventually, we propogate this info in ParseTopLevelStmtDecl and are able to mark this Decl as something we want to do value printing. Below is a example: clang-repl> int x = 42; clang-repl> x // `x` is a TopLevelStmtDecl and without a semicolon, we should set // it's IsSemiMissing bit so we can do something interesting in // ASTConsumer::HandleTopLevelDecl. The idea about annotation toke is proposed by Richard Smith, thanks! Signed-off-by: Jun Zhang <jun@junz.org> Differential Revision: https://reviews.llvm.org/D148997
Diffstat (limited to 'clang/unittests/Interpreter/InterpreterTest.cpp')
0 files changed, 0 insertions, 0 deletions