History log of /llvm-project/clang/unittests/Interpreter/CodeCompletionTest.cpp (Results 1 – 11 of 11)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1
# a72d7eea 23-Sep-2024 Vassil Vassilev <v.g.vassilev@gmail.com>

[clang-repl] Simplify the value printing logic to enable out-of-process. (#107737)

This patch improves the design of the IncrementalParser and Interpreter
classes. Now the incremental parser is onl

[clang-repl] Simplify the value printing logic to enable out-of-process. (#107737)

This patch improves the design of the IncrementalParser and Interpreter
classes. Now the incremental parser is only responsible for building the
partial translation unit declaration and the AST, while the Interpreter
fills in the lower level llvm::Module and other JIT-related
infrastructure. Finally the Interpreter class now orchestrates the AST
and the LLVM IR with the IncrementalParser and IncrementalExecutor
classes.

The design improvement allows us to rework some of the logic that
extracts an interpreter value into the clang::Value object. The new
implementation simplifies use-cases which are used for out-of-process
execution by allowing interpreter to be inherited or customized with an
clang::ASTConsumer.

This change will enable completing the pretty printing work which is in
llvm/llvm-project#84769

show more ...


Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7
# 647d2728 30-May-2024 Stefan Gränitz <stefan.graenitz@gmail.com>

[clang-repl] Fix SetUp in CodeCompletionTest fixture (#93816)

And sort out some unused headers


# a871470a 30-May-2024 Stefan Gränitz <stefan.graenitz@gmail.com>

[clang-repl] Introduce common fixture class in unittests (NFC) (#93816)

Reduce code bloat by checking test requirements in a common test fixture


# 6a47315a 28-May-2024 Stefan Gränitz <stefan.graenitz@gmail.com>

[clang-repl] Even more tests create the Interpreter and must check host JIT support (#84758)


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# 7022a247 20-Dec-2023 Vladimir Vereschaka <vvereschaka@accesssoftek.com>

[ClangRepl] Fix failed ClangReplInterpreter unit tests (#75556).

See more details: https://lab.llvm.org/buildbot/#/builders/119/builds/16346

Behalf of @vgvassilev


# 35b366ac 19-Dec-2023 Fred Fu <moonsolo@gmail.com>

[ClangRepl] Reland Semanic Code Completion (#75556)

This patch contains changes from
002d471a4a3cd8b429e4ca7c84fd54a642e50e4c, in
addition to a bug fix that added a virtual destructor to
`Complet

[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.

show more ...


Revision tags: llvmorg-17.0.6
# 9ebe6e28 23-Nov-2023 Fred Fu <moonsolo@gmail.com>

Revert "[ClangRepl] Type Directed Code Completion" (#73259)

Reverts llvm/llvm-project#67349

There are some issues with the sanitizers. We will reland once that's fixed.


# 002d471a 23-Nov-2023 Fred Fu <moonsolo@gmail.com>

[ClangRepl] Type Directed Code Completion (#67349)

Differential Revision: https://reviews.llvm.org/D159128


Revision tags: llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4
# 86337bec 31-Aug-2023 Jake Egan <5326451+jakeegan@users.noreply.github.com>

[AIX][ClangRepl] Disable new tests on AIX

These newly added tests fail on AIX with error `LLVM ERROR: Incompatible object format!`. Disable them for now while we investigate.

Reviewed By: capfredf,

[AIX][ClangRepl] Disable new tests on AIX

These newly added tests fail on AIX with error `LLVM ERROR: Incompatible object format!`. Disable them for now while we investigate.

Reviewed By: capfredf, shchenz

Differential Revision: https://reviews.llvm.org/D159213

show more ...


# 79af92bb 28-Aug-2023 Fred Fu <moonsolo@gmail.com>

Reland "[clang-repl] support code completion at a REPL."

Original commit message:
"
This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a li

Reland "[clang-repl] support code completion at a REPL."

Original commit message:
"
This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a list completer for LineEditor, a
CompletionConsumer from SemaCodeCompletion, and the ASTUnit::codeComplete method.
The first component serves as the main entry point of handling interactive inputs.

Because a completion point for a compiler instance has to be unchanged once it
is set, an incremental compiler instance is created for each code
completion. Such a compiler instance carries over AST context source from the
main interpreter compiler in order to obtain declarations or bindings from
previous input in the same REPL session.

The most important API codeComplete in Interpreter/CodeCompletion is a thin
wrapper that calls with ASTUnit::codeComplete with necessary arguments, such as
a code completion point and a ReplCompletionConsumer, which communicates
completion results from SemaCodeCompletion back to the list completer for the
REPL.

In addition, PCC_TopLevelOrExpression and CCC_TopLevelOrExpression` top levels
were added so that SemaCodeCompletion can treat top level statements like
expression statements at the REPL. For example,

clang-repl> int foo = 42;
clang-repl> f<tab>

From a parser's persective, the cursor is at a top level. If we used code
completion without any changes, PCC_Namespace would be supplied to
Sema::CodeCompleteOrdinaryName, and thus the completion results would not
include foo.

Currently, the way we use PCC_TopLevelOrExpression and
CCC_TopLevelOrExpression is no different from the way we use PCC_Statement
and CCC_Statement respectively.

Differential revision: https://reviews.llvm.org/D154382
"

The new patch also fixes clangd and several memory issues that the bots reported
and upload the missing files.

show more ...


# eb0e6c31 22-Aug-2023 Fred Fu <moonsolo@gmail.com>

[clang-repl] support code completion at a REPL.

This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a list completer for LineEditor, a
Compl

[clang-repl] support code completion at a REPL.

This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a list completer for LineEditor, a
CompletionConsumer from SemaCodeCompletion, and the ASTUnit::codeComplete method.
The first component serves as the main entry point of handling interactive inputs.

Because a completion point for a compiler instance has to be unchanged once it
is set, an incremental compiler instance is created for each code
completion. Such a compiler instance carries over AST context source from the
main interpreter compiler in order to obtain declarations or bindings from
previous input in the same REPL session.

The most important API codeComplete in Interpreter/CodeCompletion is a thin
wrapper that calls with ASTUnit::codeComplete with necessary arguments, such as
a code completion point and a ReplCompletionConsumer, which communicates
completion results from SemaCodeCompletion back to the list completer for the
REPL.

In addition, PCC_TopLevelOrExpression and CCC_TopLevelOrExpression` top levels
were added so that SemaCodeCompletion can treat top level statements like
expression statements at the REPL. For example,

clang-repl> int foo = 42;
clang-repl> f<tab>

From a parser's persective, the cursor is at a top level. If we used code
completion without any changes, PCC_Namespace would be supplied to
Sema::CodeCompleteOrdinaryName, and thus the completion results would not
include foo.

Currently, the way we use PCC_TopLevelOrExpression and
CCC_TopLevelOrExpression is no different from the way we use PCC_Statement
and CCC_Statement respectively.

Differential revision: https://reviews.llvm.org/D154382

show more ...