[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread Christian Kandeler via cfe-commits
@@ -499,17 +473,64 @@ class DefineOutline : public Tweak { HeaderUpdates = HeaderUpdates.merge(*DelInline); } -auto HeaderFE = Effect::fileEdit(SM, SM.getMainFileID(), HeaderUpdates); -if (!HeaderFE) - return HeaderFE.takeError(); - -Effect->ApplyEdi

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread Christian Kandeler via cfe-commits
@@ -19,7 +19,7 @@ TWEAK_TEST(DefineOutline); TEST_F(DefineOutlineTest, TriggersOnFunctionDecl) { FileName = "Test.cpp"; - // Not available unless in a header file. + // Not available for free function unless in a header file. ckandeler wrote: Do you have

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/69704 >From 27af98b5a9b71255b2873f25943ed23e42946b27 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 19 Oct 2023 17:51:11 +0200 Subject: [PATCH] [clangd] Allow "move function body out-of-line" in non-hea

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread Christian Kandeler via cfe-commits
@@ -349,6 +358,36 @@ TEST_F(DefineOutlineTest, ApplyTest) { } } +TEST_F(DefineOutlineTest, InCppFile) { + FileName = "Test.cpp"; + + struct { +llvm::StringRef Test; +llvm::StringRef ExpectedSource; + } Cases[] = { + { + R"cpp( +namespace

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread Christian Kandeler via cfe-commits
@@ -349,6 +358,36 @@ TEST_F(DefineOutlineTest, ApplyTest) { } } +TEST_F(DefineOutlineTest, InCppFile) { + FileName = "Test.cpp"; + + struct { +llvm::StringRef Test; +llvm::StringRef ExpectedSource; + } Cases[] = { + { + R"cpp( +namespace

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread Christian Kandeler via cfe-commits
@@ -349,6 +358,36 @@ TEST_F(DefineOutlineTest, ApplyTest) { } } +TEST_F(DefineOutlineTest, InCppFile) { + FileName = "Test.cpp"; + + struct { +llvm::StringRef Test; +llvm::StringRef ExpectedSource; + } Cases[] = { + { + R"cpp( +namespace

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2023-11-21 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/69704 >From 40df0527b2a3af8012f32d771a1bb2c861d42ed3 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 19 Oct 2023 17:51:11 +0200 Subject: [PATCH] [clangd] Allow "move function body out-of-line" in non-hea

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-08 Thread Christian Kandeler via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && ckandeler wrote:

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-11 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/69477 >From 0ad973446c970e110f1b9c1213e97a7d3da8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 18 Oct 2023 17:24:04 +0200 Subject: [PATCH] [clangd] Do not offer extraction to variable for decl init

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-11 Thread Christian Kandeler via cfe-commits
@@ -27,10 +27,10 @@ TEST_F(ExtractVariableTest, Test) { return t.b[[a]]r]]([[t.z]])]]; } void f() { - int a = [[5 +]] [[4 * xyz]](); + int a = 5 + [[4 * xyz]](); // multivariable initialization if(1) -int x = [[1

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-11 Thread Christian Kandeler via cfe-commits
@@ -422,8 +422,6 @@ TEST_F(ExtractVariableTest, Test) { int member = 42; }; )cpp"}, - {R"cpp(void f() { auto x = [[ [](){ return 42; }]]; })cpp", ckandeler wrote: Done. https://github.com/llvm/llvm-project/pull/69477 _

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-11 Thread Christian Kandeler via cfe-commits
@@ -504,68 +502,6 @@ TEST_F(ExtractVariableTest, Test) { int main() { auto placeholder = []() { return 42; }(); return placeholder ; })cpp"}, - {R"cpp( ckandeler wrote: Done. https://github.com/llvm/llvm-project/pull/69477

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-11 Thread Christian Kandeler via cfe-commits
@@ -504,68 +502,6 @@ TEST_F(ExtractVariableTest, Test) { int main() { auto placeholder = []() { return 42; }(); return placeholder ; })cpp"}, - {R"cpp( -template -void foo(Ts ...args) { - auto x = [[ [&args...]() {} ]];

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-11 Thread Christian Kandeler via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && ckandeler wrote:

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-11 Thread Christian Kandeler via cfe-commits
ckandeler wrote: The latest patch set addresses all the comments. https://github.com/llvm/llvm-project/pull/69477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix JSON conversion for symbol tags (PR #84747)

2024-03-11 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/84747 The wrong constructor of json::Value got called, making every tag an array instead of a number. >From f67994902314acd8ae0f0c561b07b8c014172e17 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 11 M

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-02-29 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/83412 ... when converting unscoped to scoped enums. With traditional enums, a popular technique to guard against potential name clashes is to use the enum name as a pseudo-namespace, like this: enum MyEnum { MyEnum

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-03-01 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/83412 >From 01f74ddece947755938ccecbcc5f9d18a41eb793 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 29 Feb 2024 12:26:52 +0100 Subject: [PATCH] [clangd] Remove potential prefix from enum value names ..

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2024-03-04 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/69704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-02-01 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/67802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-01 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/69477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2024-02-01 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/69704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-02-01 Thread Christian Kandeler via cfe-commits
ckandeler wrote: > Do you have another patch where you use the new `DocComment` field? Is it > for showing in a hover? Yes, it is for showing documentation in a hover. clangd already supports that; it's just that it currently works only if the comments are attached to the declaration. With t

[clang-tools-extra] [clang] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-02-01 Thread Christian Kandeler via cfe-commits
ckandeler wrote: > Ok, I see. (I was confused because nothing in the patch looks at the contents > of `Symbol::DocComment` other than > an `empty()` check; maybe a `bool HasDocComment` flag is sufficient?) Right, we just need to save the information whether there was a doc comment before clan

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-02-02 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/67802 >From fb3711aa040aa2a986ed7d0c503042adecc6662a Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 29 Sep 2023 15:01:58 +0200 Subject: [PATCH] [clangd] Collect comments from function definitions into t

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-02-02 Thread Christian Kandeler via cfe-commits
ckandeler wrote: I have removed the extra Symbol member and extended the Flags enum instead. I benchmarked with Qt as the test project (qtbase, to be exact), which is heavily documented and has all its function documentation in the cpp files, so it should provide an upper bound on the effects o

[clang-tools-extra] 8b36687 - [clangd] Add highlighting modifier "constructorOrDestructor"

2022-10-21 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2022-10-21T15:14:38+02:00 New Revision: 8b3668754c889a9412a76035235b6fc581ca9863 URL: https://github.com/llvm/llvm-project/commit/8b3668754c889a9412a76035235b6fc581ca9863 DIFF: https://github.com/llvm/llvm-project/commit/8b3668754c889a9412a76035235b6fc581ca9863.

[clang-tools-extra] 6ed4a54 - [clangd] Make file limit for textDocument/rename configurable

2022-10-22 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2022-10-22T10:17:41+02:00 New Revision: 6ed4a543b8b3ab38ddb30cf4c15b70ed11266388 URL: https://github.com/llvm/llvm-project/commit/6ed4a543b8b3ab38ddb30cf4c15b70ed11266388 DIFF: https://github.com/llvm/llvm-project/commit/6ed4a543b8b3ab38ddb30cf4c15b70ed11266388.

[clang-tools-extra] 2bf960a - [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-11-07 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2022-11-07T11:58:33+01:00 New Revision: 2bf960aef08e93d687f21e6d636186561b56cbf3 URL: https://github.com/llvm/llvm-project/commit/2bf960aef08e93d687f21e6d636186561b56cbf3 DIFF: https://github.com/llvm/llvm-project/commit/2bf960aef08e93d687f21e6d636186561b56cbf3.

[clang-tools-extra] bbddbe5 - [clangd] Add semantic token for angle brackets

2023-01-31 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2023-01-31T17:15:31+01:00 New Revision: bbddbe580bca5fa1c0478a3ec6edd0e0c40b9d96 URL: https://github.com/llvm/llvm-project/commit/bbddbe580bca5fa1c0478a3ec6edd0e0c40b9d96 DIFF: https://github.com/llvm/llvm-project/commit/bbddbe580bca5fa1c0478a3ec6edd0e0c40b9d96.

[clang] 535f34d - [index][clangd] Consider labels when indexing function bodies

2023-08-01 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2023-08-01T09:07:05+02:00 New Revision: 535f34dd80c2200c35971632021a5ed375774d9b URL: https://github.com/llvm/llvm-project/commit/535f34dd80c2200c35971632021a5ed375774d9b DIFF: https://github.com/llvm/llvm-project/commit/535f34dd80c2200c35971632021a5ed375774d9b.

[clang-tools-extra] 699a59a - [clangd] Mark "override" and "final" as modifiers

2022-11-21 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2022-11-21T22:01:12+01:00 New Revision: 699a59aa5865d8b10f42284f68c424a9123cb8b2 URL: https://github.com/llvm/llvm-project/commit/699a59aa5865d8b10f42284f68c424a9123cb8b2 DIFF: https://github.com/llvm/llvm-project/commit/699a59aa5865d8b10f42284f68c424a9123cb8b2.

[clang-tools-extra] 008cb29 - [clangd] Renaming: Treat member functions like other functions

2023-05-22 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2023-05-22T12:50:38+02:00 New Revision: 008cb29f87f3af391eb6c3747bdad16f2e386161 URL: https://github.com/llvm/llvm-project/commit/008cb29f87f3af391eb6c3747bdad16f2e386161 DIFF: https://github.com/llvm/llvm-project/commit/008cb29f87f3af391eb6c3747bdad16f2e386161.

[clang-tools-extra] e72baa7 - [clangd] Add semantic token for labels

2023-06-07 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2023-06-07T12:28:06+02:00 New Revision: e72baa76b91fbcb2b16747cb7d2088723478a754 URL: https://github.com/llvm/llvm-project/commit/e72baa76b91fbcb2b16747cb7d2088723478a754 DIFF: https://github.com/llvm/llvm-project/commit/e72baa76b91fbcb2b16747cb7d2088723478a754.

[clang-tools-extra] 647d314 - [clangd] Add support for semantic token type "operator"

2022-12-12 Thread Christian Kandeler via cfe-commits
Author: Christian Kandeler Date: 2022-12-12T16:17:43+01:00 New Revision: 647d314eb059b6d2e7c00d7eefe6a7afc37dff25 URL: https://github.com/llvm/llvm-project/commit/647d314eb059b6d2e7c00d7eefe6a7afc37dff25 DIFF: https://github.com/llvm/llvm-project/commit/647d314eb059b6d2e7c00d7eefe6a7afc37dff25.

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread Christian Kandeler via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && ckandeler wrote:

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread Christian Kandeler via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && ckandeler wrote:

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread Christian Kandeler via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && ckandeler wrote:

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-02-19 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/69477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-09 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/67802 >From 80e15f748b30d4e977b58a42d8fd4403234bb954 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 29 Sep 2023 15:01:58 +0200 Subject: [PATCH] [clangd] Collect comments from function definitions into t

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-09 Thread Christian Kandeler via cfe-commits
ckandeler wrote: > At this point, my main feedback is that it would be good to include some unit > tests. `SymbolCollectorTests.cpp` is a good > place for them. I've added a new test and verified that it fails without this patch. > What is the purpose of the change to `ASTContext.cpp`? Ther

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-09 Thread Christian Kandeler via cfe-commits
@@ -1069,6 +1071,27 @@ void SymbolCollector::addDefinition(const NamedDecl &ND, Symbol S = DeclSym; // FIXME: use the result to filter out symbols. S.Definition = *DefLoc; + + std::string DocComment; + std::string Documentation; + if (!(S.Flags & Symbol::HasDocComment)

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-11 Thread Christian Kandeler via cfe-commits
ckandeler wrote: > I wrote a libAST unit test to demonstrate the bug, and filed #108145 about > it. Hopefully folks more familiar with that code can suggest an appropriate > fix there. Awesome, thanks. https://github.com/llvm/llvm-project/pull/67802 ___

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-11 Thread Christian Kandeler via cfe-commits
@@ -1477,6 +1477,26 @@ TEST_F(SymbolCollectorTest, Documentation) { forCodeCompletion(false; } +TEST_F(SymbolCollectorTest, DocumentationInMain) { ckandeler wrote: Hm, do we really want to specify a behavior there? My thinking was

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-04-08 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/67802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2024-04-08 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/69704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member functions (PR #95235)

2024-06-12 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/95235 ... of class templates. >From fc3a907ab2550a999801d37400268fdc31df054d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 14 Nov 2023 16:35:46 +0100 Subject: [PATCH] [clangd] Let DefineOutline tweak

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2024-06-03 Thread Christian Kandeler via cfe-commits
ckandeler wrote: I'm going to merge this without explicit format approval based on the following: - There was a general LGTM. - I addressed the remaining issues. - There was no further feedback for more than half a year. https://github.com/llvm/llvm-project/pull/69704 _

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2024-06-03 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/69704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-04-15 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/83412 >From 78393d26e62f2f9a30f366501f8e61b1a32d6af4 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 29 Feb 2024 12:26:52 +0100 Subject: [PATCH] [clangd] Remove potential prefix from enum value names ..

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-04-15 Thread Christian Kandeler via cfe-commits
ckandeler wrote: Incorporated review comments. https://github.com/llvm/llvm-project/pull/83412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] use existing function for code locations in the scopify enum tweak (PR #88737)

2024-04-15 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler approved this pull request. https://github.com/llvm/llvm-project/pull/88737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Let DefineOutline tweak create a definition from scratch (PR #71950)

2024-04-18 Thread Christian Kandeler via cfe-commits
ckandeler wrote: We should probably rekindle the discussion on the associated bug report; I think users (rightly) expect this feature. https://github.com/llvm/llvm-project/pull/71950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-05-02 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/83412 >From 349edc160e9c13068c42b35321814296bb713a09 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 29 Feb 2024 12:26:52 +0100 Subject: [PATCH] [clangd] Remove potential prefix from enum value names ..

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-05-02 Thread Christian Kandeler via cfe-commits
ckandeler wrote: Underscore separators get removed now. https://github.com/llvm/llvm-project/pull/83412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-05-02 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/83412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-05-02 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler reopened https://github.com/llvm/llvm-project/pull/83412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Remove potential prefix from enum value names (PR #83412)

2024-05-02 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/83412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

2024-05-02 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/69704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-05-02 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/67802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support callHierarchy/outgoingCalls (PR #91191)

2024-05-06 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/91191 None >From d7cfeb6599fd507eed8935e452efd782fc3f0481 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 30 Apr 2024 18:20:05 +0200 Subject: [PATCH] [clangd] Support callHierarchy/outgoingCalls --- c

[clang-tools-extra] [clangd] Support callHierarchy/outgoingCalls (PR #91191)

2024-05-06 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/91191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support callHierarchy/outgoingCalls (PR #91191)

2024-05-06 Thread Christian Kandeler via cfe-commits
ckandeler wrote: > I remembered @HighCommander4 had filed a similar PR at #77556. Is this one > separate, or are they actually the same (i.e. both are salvaged from > https://reviews.llvm.org/D93829)? I didn't know about that one. Seems nothing gets reviewed anymore these days. https://github

[clang-tools-extra] [clangd] Support callHierarchy/outgoingCalls (PR #91191)

2024-05-06 Thread Christian Kandeler via cfe-commits
ckandeler wrote: > If I'm understanding correctly, the implementation approach in this PR only > finds callees in the current translation > unit. > The approach in #77556 uses the project's index to find callees across > translation unit boundaries. Right, that's obviously nicer. > Regarding

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member functions (PR #95235)

2024-08-26 Thread Christian Kandeler via cfe-commits
@@ -144,8 +144,13 @@ getQualification(ASTContext &Context, const DeclContext *DestContext, // since we stored inner-most parent first. std::string Result; llvm::raw_string_ostream OS(Result); - for (const auto *Parent : llvm::reverse(Parents)) + for (const auto *Parent

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member functions (PR #95235)

2024-08-26 Thread Christian Kandeler via cfe-commits
@@ -407,10 +431,21 @@ class DefineOutline : public Tweak { return !SameFile; } -// Bail out in templated classes, as it is hard to spell the class name, -// i.e if the template parameter is unnamed. -if (MD->getParent()->isTemplated()) - return false

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member functions (PR #95235)

2024-08-26 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/95235 >From de740c00c4cc3a9f2e8aff14cf8ebd880a240e58 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 14 Nov 2023 16:35:46 +0100 Subject: [PATCH] [clangd] Let DefineOutline tweak handle member functions

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-12 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/67802 >From dec33143e617967dee46ce4123a2e298220d73fc Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 29 Sep 2023 15:01:58 +0200 Subject: [PATCH] [clangd] Collect comments from function definitions into t

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-13 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/67802 >From f441c0bd52add3d5b63bc0f19a3d38cb12477359 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 29 Sep 2023 15:01:58 +0200 Subject: [PATCH] [clangd] Collect comments from function definitions into t

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-13 Thread Christian Kandeler via cfe-commits
ckandeler wrote: > Meanwhile, I thought of a fix for #108145 and submitted it as #108475. > If that's accepted, you should be able to drop the `ASTContext.cpp` changes > from this patch. Nice, will do. https://github.com/llvm/llvm-project/pull/67802 __

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member functions (PR #95235)

2024-10-14 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/95235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member functions (PR #95235)

2024-10-14 Thread Christian Kandeler via cfe-commits
ckandeler wrote: Thanks! https://github.com/llvm/llvm-project/pull/95235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-10-15 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/112345 None >From f2b6d67d882fca9a1dae3b50166541df7f22cb44 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 14 Oct 2024 15:37:01 +0200 Subject: [PATCH] [clangd] Let DefineOutline tweak handle member func

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-10-15 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/112345 >From 0d847ccd3b26f2e0ef1203c091d6152d6abea58a Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 14 Oct 2024 15:37:01 +0200 Subject: [PATCH] [clangd] Let DefineOutline tweak handle member function

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-10-15 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/112345 >From 5b729d0bc7b2d5ed2f0d1645a29e3fb9b0a35033 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 14 Oct 2024 15:37:01 +0200 Subject: [PATCH] [clangd] Let DefineOutline tweak handle member function

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-10-15 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/112345 >From 42ea89f38b599796b15d50d078cba1cb0e0f2b02 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 14 Oct 2024 15:37:01 +0200 Subject: [PATCH] [clangd] Let DefineOutline tweak handle member function

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member functions (PR #95235)

2024-10-09 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/95235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-10-17 Thread Christian Kandeler via cfe-commits
ckandeler wrote: Needs rebase and another typo fix. Looks good to me otherwise. https://github.com/llvm/llvm-project/pull/81640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-10-17 Thread Christian Kandeler via cfe-commits
@@ -105,7 +105,7 @@ bool isRootStmt(const Node *N) { if (N->Selected == SelectionTree::Partial) return false; // A DeclStmt can be an unselected RootStmt since VarDecls claim the entire - // selection range in selectionTree. Additionally, an CXXOperatorCallExpr of a +

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-10-18 Thread Christian Kandeler via cfe-commits
ckandeler wrote: > ```c++ > template > inline void Foo::bar(const T& t, const U& u) {} > ``` > > this won't compile as `T` isn't defined. you also need to print `template > ` on top (and keep doing for rest of the outer decls). The patch does that already. In the test, the outer template dec

[clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-20 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/67802 >From 9dd725113a156a01f1866cfefe181c1b22f7e8d0 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 29 Sep 2023 15:01:58 +0200 Subject: [PATCH] [clangd] Collect comments from function definitions into t

[clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-20 Thread Christian Kandeler via cfe-commits
@@ -451,8 +451,17 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( if (LastCheckedRedecl) { if (LastCheckedRedecl == Redecl) { LastCheckedRedecl = nullptr; +continue; ckandeler wrote: Done. https://github.com/llvm/llvm-pro

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-11-25 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler approved this pull request. Appears to work fine. Regarding the slight memory increase: If anyone feels strongly about it, they had plenty of time to chime in. https://github.com/llvm/llvm-project/pull/77556 ___ cfe-commit

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2024-11-29 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/118102 Apart from fixing the linked issue, this is also necessary for supporting LSP's LocationLink feature and for finding proper insertion locations in the DefineOutline tweak. Memory consumption of the background

[clang-tools-extra] [clangd] Consolidate two functions converting index to LSP locations (PR #117885)

2024-11-27 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/117885 None >From 7aa28a386a84c4fa8e7e8aa13822fd3e058b076c Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 27 Nov 2024 14:55:18 +0100 Subject: [PATCH] [clangd] Consolidate two functions converting index

[clang-tools-extra] [clangd] Fix erroneous qualification of template type parameters (PR #116821)

2024-11-19 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/116821 ...in DefineOutline tweak. E.g. moving the following definition: template struct S { T f^oo() const { return T(); } }; would result in: // ... template S::T S::foo() const { return T(); } instead of: te

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-11-18 Thread Christian Kandeler via cfe-commits
@@ -443,13 +461,26 @@ class DefineOutline : public Tweak { SameFile = true; // Bail out if the template parameter is unnamed. +// FIXME: Is this really needed? It inhibits application on ckandeler wrote: I've moved the comment down to

[clang-tools-extra] [clangd] Fix erroneous qualification of template type parameters (PR #116821)

2024-11-20 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/116821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-11-20 Thread Christian Kandeler via cfe-commits
@@ -88,56 +89,6 @@ # CHECK-NEXT: } # CHECK-NEXT: ] --- -{"jsonrpc":"2.0","id":2,"method":"typeHierarchy/subtypes","params":{"item":{"uri":"test:///main.cpp","data":{"parents":[{"parents":[{"parents":[],"symbolID":"FE546E7B648D69A7"}],"symbolID":"ECDC0C46D75120F4"}],"symbol

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-11-20 Thread Christian Kandeler via cfe-commits
@@ -2346,11 +2346,11 @@ outgoingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index) { // Filter references to only keep function calls using SK = index::SymbolKind; auto Kind = Callee.SymInfo.Kind; -if (Kind != SK::Function && Kind != SK::InstanceMet

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-11-20 Thread Christian Kandeler via cfe-commits
@@ -2346,11 +2346,11 @@ outgoingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index) { // Filter references to only keep function calls ckandeler wrote: This comment doesn't really apply anymore. https://github.com/llvm/llvm-project/pull/77556 __

[clang-tools-extra] [clangd] Fix erroneous qualification of template type parameters (PR #116821)

2024-11-19 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler edited https://github.com/llvm/llvm-project/pull/116821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-11-19 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/112345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-11-18 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/112345 >From 5b563ceec2c3462a00101526fa416a835a59e7c0 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 14 Oct 2024 15:37:01 +0200 Subject: [PATCH] [clangd] Let DefineOutline tweak handle member function

[clang-tools-extra] [clangd] Drop requirement for named template parameters (PR #117565)

2024-11-25 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/117565 ... in DefineOutline tweak for function templates. As opposed to class templates, the name is not required for writing an out-of-line definition. >From 064d23753ed1ac673bda33ab815dbb12c6bcc6f6 Mon Sep 17 00:0

[clang-tools-extra] [clangd] Drop requirement for named template parameters (PR #117565)

2024-11-26 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/117565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Consolidate two functions converting index to LSP locations (PR #117885)

2024-12-05 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler closed https://github.com/llvm/llvm-project/pull/117885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2024-12-05 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/118102 >From c44237813fb3357dee3f7d17048a7178e67a2422 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 27 Nov 2024 13:47:32 +0100 Subject: [PATCH] [clangd] Store full decl/def range with symbol locations

[clang-tools-extra] [clangd] Consider expression statements in ExtractVariable tweak (PR #112525)

2024-12-09 Thread Christian Kandeler via cfe-commits
ckandeler wrote: > In the expression-statement case, the expression isn't moving to a new > location, and the variable name is only mentioned in > one place. In essence, the refactoring amounts to prepending `auto > placeholder = ` to the expression. Given that you're > going to be (very like

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-10 Thread Christian Kandeler via cfe-commits
ckandeler wrote: ping https://github.com/llvm/llvm-project/pull/118102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >