diff options
author | Fred Fu <moonsolo@gmail.com> | 2023-12-19 15:53:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-19 22:53:02 +0200 |
commit | 35b366ace73d0ede3cdeeb4d09150a9945750b7f (patch) | |
tree | 86e8793843827ca4a9007fcb14e858acf48a4934 /clang/lib/Interpreter/Interpreter.cpp | |
parent | edbd034248bcec94863199de7c7dcfd3347284a9 (diff) | |
download | llvm-35b366ace73d0ede3cdeeb4d09150a9945750b7f.zip llvm-35b366ace73d0ede3cdeeb4d09150a9945750b7f.tar.gz llvm-35b366ace73d0ede3cdeeb4d09150a9945750b7f.tar.bz2 |
[ClangRepl] Reland Semanic Code Completion (#75556)
This patch contains changes from
002d471a4a3cd8b429e4ca7c84fd54a642e50e4c, in
addition to a bug fix that added a virtual destructor to
`CompletionContextHandler`
The original changes in the orginal commit piggybacks on clang's
semantic modules to enable semantic completion. In particular, we use
`CodeCompletionContext` to differentiate two types of code completion.
We also
extract the relevant type information from it.
Diffstat (limited to 'clang/lib/Interpreter/Interpreter.cpp')
-rw-r--r-- | clang/lib/Interpreter/Interpreter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp index 7968c62..c9fcef5 100644 --- a/clang/lib/Interpreter/Interpreter.cpp +++ b/clang/lib/Interpreter/Interpreter.cpp @@ -319,6 +319,10 @@ const CompilerInstance *Interpreter::getCompilerInstance() const { return IncrParser->getCI(); } +CompilerInstance *Interpreter::getCompilerInstance() { + return IncrParser->getCI(); +} + llvm::Expected<llvm::orc::LLJIT &> Interpreter::getExecutionEngine() { if (!IncrExecutor) { if (auto Err = CreateExecutor()) |