capfredf wrote:
@vgvassilev there are some issues reported by sanitizers. Let's revert the
patch. I will fix those issues and then re-land the patch
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
capfredf wrote:
@vgvassilev Thank you very much!
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vgvassilev closed
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 80962a4daaf20069c56d86f196a06abc91f3474c Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH] [ClangRepl] Add type directed code completion to clang-repl
use
vgvassilev wrote:
@capfredf, can you rebase the PR to trigger a rebuild - the test failure seems
unrelated to our changes but maybe it was fixed meanwhile.
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
https://github.com/vgvassilev approved this pull request.
LGTM! Thank you!
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
capfredf wrote:
ping @vgvassilev
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 2e01c0e7974977d5dd13ef2dcab765c4d714f5ce Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH] [ClangRepl] Add type directed code completion to clang-repl
use
@@ -56,26 +63,146 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+// The class CompletionContextHandler contains four interfaces, each of
+// which
@@ -56,26 +63,146 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+// The class CompletionContextHandler contains four interfaces, each of
+// which
@@ -56,26 +63,146 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+// The class CompletionContextHandler contains four interfaces, each of
+// which
@@ -56,26 +63,146 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+// The class CompletionContextHandler contains four interfaces, each of
+// which
@@ -56,26 +63,146 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+// The class CompletionContextHandler contains four interfaces, each of
+// which
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 304c77231a403a8c3eb0b5650a58ebf36655f263 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH] [ClangRepl] Add type directed code completion to clang-repl
use
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 3393f32af92a7ae37d4046b03ed670b717aee82b Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH] [ClangRepl] Add type directed code completion to clang-repl
use
@@ -37,16 +39,15 @@ static std::vector runComp(clang::Interpreter
,
std::vector Results;
std::vector Comps;
-
- codeComplete(
- const_cast((*Interp)->getCompilerInstance()),
- Prefix, /* Lines */ 1, Prefix.size(), MainInterp.getCompilerInstance(),
-
@@ -37,16 +39,15 @@ static std::vector runComp(clang::Interpreter
,
std::vector Results;
std::vector Comps;
-
- codeComplete(
- const_cast((*Interp)->getCompilerInstance()),
- Prefix, /* Lines */ 1, Prefix.size(), MainInterp.getCompilerInstance(),
-
@@ -56,26 +69,151 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+/*
+ The abstract class CompletionContextHandler contains four interfaces, each of
+
@@ -37,16 +39,15 @@ static std::vector runComp(clang::Interpreter
,
std::vector Results;
std::vector Comps;
-
- codeComplete(
- const_cast((*Interp)->getCompilerInstance()),
- Prefix, /* Lines */ 1, Prefix.size(), MainInterp.getCompilerInstance(),
-
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From c3cead275f5fa2f8d3d6c78fd747eae9a3edbd92 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH] [ClangRepl] Add type directed code completion to clang-repl
use
@@ -159,29 +308,62 @@ void ExternalSource::completeVisibleDeclsMap(
for (auto *DeclCtxt = ParentTUDeclCtxt; DeclCtxt != nullptr;
DeclCtxt = DeclCtxt->getPreviousDecl()) {
for (auto : DeclCtxt->decls()) {
- if (NamedDecl *Decl = llvm::dyn_cast(IDeclContext))
@@ -56,26 +69,151 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+/*
+ The abstract class CompletionContextHandler contains four interfaces, each of
+
@@ -56,26 +69,151 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+/*
+ The abstract class CompletionContextHandler contains four interfaces, each of
+
@@ -159,29 +308,62 @@ void ExternalSource::completeVisibleDeclsMap(
for (auto *DeclCtxt = ParentTUDeclCtxt; DeclCtxt != nullptr;
DeclCtxt = DeclCtxt->getPreviousDecl()) {
for (auto : DeclCtxt->decls()) {
- if (NamedDecl *Decl = llvm::dyn_cast(IDeclContext))
@@ -56,26 +69,151 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+/*
+ The abstract class CompletionContextHandler contains four interfaces, each of
+
@@ -56,26 +69,151 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+/*
+ The abstract class CompletionContextHandler contains four interfaces, each of
+
@@ -56,26 +69,151 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+/*
+ The abstract class CompletionContextHandler contains four interfaces, each of
+
@@ -118,6 +256,16 @@ void IncrementalSyntaxOnlyAction::ExecuteAction() {
CI.getASTContext().getTranslationUnitDecl()->setHasExternalVisibleStorage(
true);
+ // Load all external decls into current context. Under the hood, it calls
vgvassilev wrote:
@@ -56,26 +69,151 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+/*
+ The abstract class CompletionContextHandler contains four interfaces, each of
+
@@ -37,12 +40,22 @@ clang::CodeCompleteOptions getClangCompleteOpts() {
return Opts;
}
+class CodeCompletionSubContext {
vgvassilev wrote:
I cannot seem to find the uses of this class.
https://github.com/llvm/llvm-project/pull/67349
@@ -23,8 +23,27 @@ namespace clang {
class CodeCompletionResult;
class CompilerInstance;
-void codeComplete(CompilerInstance *InterpCI, llvm::StringRef Content,
- unsigned Line, unsigned Col, const CompilerInstance
*ParentCI,
- std::vector
@@ -56,26 +69,151 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+/*
+ The abstract class CompletionContextHandler contains four interfaces, each of
+
@@ -56,26 +69,151 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompleter
+};
+
+/*
+ The abstract class CompletionContextHandler contains four interfaces, each of
+
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 57de74a2f63ee1db8519bc3225b2ccaef2b216c5 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH] [ClangRepl] Add type directed code completion to clang-repl
use
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 582f652f35d813a86790bc62473a0efc4560ae9a Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/9] [ClangRepl] Type Directed Code Completion
---
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 582f652f35d813a86790bc62473a0efc4560ae9a Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/5] [ClangRepl] Type Directed Code Completion
---
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 582f652f35d813a86790bc62473a0efc4560ae9a Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/4] [ClangRepl] Type Directed Code Completion
---
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 582f652f35d813a86790bc62473a0efc4560ae9a Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/3] [ClangRepl] Type Directed Code Completion
---
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 582f652f35d813a86790bc62473a0efc4560ae9a Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/2] [ClangRepl] Type Directed Code Completion
---
@@ -56,26 +69,135 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompletion
+};
+
+class CompletionContextHanndler {
vgvassilev wrote:
```suggestion
@@ -166,8 +300,37 @@ void ExternalSource::completeVisibleDeclsMap(
SetExternalVisibleDeclsForName(ChildDeclContext,
importedNamedDecl->getDeclName(),
importedNamedDecl);
-
@@ -23,8 +23,13 @@ namespace clang {
class CodeCompletionResult;
class CompilerInstance;
-void codeComplete(CompilerInstance *InterpCI, llvm::StringRef Content,
- unsigned Line, unsigned Col, const CompilerInstance
*ParentCI,
- std::vector
@@ -56,26 +69,135 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompletion
+};
+
+class CompletionContextHanndler {
+protected:
+ CodeCompletionContext CCC;
+
@@ -56,26 +69,135 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompletion
+};
+
+class CompletionContextHanndler {
+protected:
+ CodeCompletionContext CCC;
+
@@ -101,6 +223,7 @@ class ExternalSource : public clang::ExternalASTSource {
ASTContext , FileManager );
bool FindExternalVisibleDeclsByName(const DeclContext *DC,
DeclarationName Name) override;
+ // void
@@ -56,26 +69,135 @@ class ReplCompletionConsumer : public CodeCompleteConsumer
{
std::shared_ptr CCAllocator;
CodeCompletionTUInfo CCTUInfo;
std::vector
+ ReplCodeCompletion
+};
+
+class CompletionContextHanndler {
+protected:
+ CodeCompletionContext CCC;
+
https://github.com/vgvassilev commented:
Looks like this is heading in a good direction. Thank you!
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/vgvassilev edited
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
capfredf wrote:
@vgvassilev
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 582f652f35d813a86790bc62473a0efc4560ae9a Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH] [ClangRepl] Type Directed Code Completion
---
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 61bb4c46f6733128d5ec4b511a858f08e86bfd40 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH] [ClangRepl] Type Directed Code Completion
Differential Revision:
https://github.com/capfredf ready_for_review
https://github.com/llvm/llvm-project/pull/67349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 4b371d40d74d6297bdb5ecbe2eae0573e20d0569 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/8] [ClangRepl] Type Directed Code Completion
Differential Revision:
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 4b371d40d74d6297bdb5ecbe2eae0573e20d0569 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/6] [ClangRepl] Type Directed Code Completion
Differential Revision:
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 4b371d40d74d6297bdb5ecbe2eae0573e20d0569 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/5] [ClangRepl] Type Directed Code Completion
Differential Revision:
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 8586cd5ad8a7fa4f84b5913cbeaf634d68500095
dd3e3e6b8eb3f9f1f740d2a9fc8a62e1964f9153 --
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 4b371d40d74d6297bdb5ecbe2eae0573e20d0569 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/4] [ClangRepl] Type Directed Code Completion
Differential Revision:
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 4b371d40d74d6297bdb5ecbe2eae0573e20d0569 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/2] [ClangRepl] Type Directed Code Completion
Differential Revision:
https://github.com/capfredf updated
https://github.com/llvm/llvm-project/pull/67349
>From 90dae115b403ad7019f51154b4b771a2a2997a8f Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH 1/2] [ClangRepl] Type Directed Code Completion
Differential Revision:
llvmbot wrote:
@llvm/pr-subscribers-clang
Changes
Differential Revision: https://reviews.llvm.org/D159128
---
Patch is 20.30 KiB, truncated to 20.00 KiB below, full version:
https://github.com/llvm/llvm-project/pull/67349.diff
5 Files Affected:
- (modified)
https://github.com/capfredf created
https://github.com/llvm/llvm-project/pull/67349
Differential Revision: https://reviews.llvm.org/D159128
>From 0515d9d0901bc00b26787b1774ef003d5f0b8567 Mon Sep 17 00:00:00 2001
From: Fred Fu
Date: Tue, 29 Aug 2023 11:56:59 -0400
Subject: [PATCH] [ClangRepl]
61 matches
Mail list logo