https://github.com/ckandeler updated
https://github.com/llvm/llvm-project/pull/128164
>From cca5b5a1d7f50ea7923fdc1ba63764c0b787ef8d Mon Sep 17 00:00:00 2001
From: Christian Kandeler
Date: Mon, 25 Nov 2024 17:39:21 +0100
Subject: [PATCH] [clangd] Find better insertion locations in DefineOutline
https://github.com/ckandeler updated
https://github.com/llvm/llvm-project/pull/128164
>From da6a6e8fccf99f595d38e7ff6785b605a38401db Mon Sep 17 00:00:00 2001
From: Christian Kandeler
Date: Mon, 25 Nov 2024 17:39:21 +0100
Subject: [PATCH] [clangd] Find better insertion locations in DefineOutline
https://github.com/ckandeler updated
https://github.com/llvm/llvm-project/pull/128164
>From de493ea09fc685ef700bd618eeb847c631a18995 Mon Sep 17 00:00:00 2001
From: Christian Kandeler
Date: Mon, 25 Nov 2024 17:39:21 +0100
Subject: [PATCH] [clangd] Find better insertion locations in DefineOutline
https://github.com/ckandeler updated
https://github.com/llvm/llvm-project/pull/128164
>From dcecc6815af5e71b6a9fed380c859c957961240a Mon Sep 17 00:00:00 2001
From: Christian Kandeler
Date: Mon, 25 Nov 2024 17:39:21 +0100
Subject: [PATCH] [clangd] Find better insertion locations in DefineOutline
https://github.com/ckandeler updated
https://github.com/llvm/llvm-project/pull/128164
>From 615acbb28d8f03f4553d18680ade62144ed44a09 Mon Sep 17 00:00:00 2001
From: Christian Kandeler
Date: Mon, 25 Nov 2024 17:39:21 +0100
Subject: [PATCH] [clangd] Find better insertion locations in DefineOutline
https://github.com/ckandeler created
https://github.com/llvm/llvm-project/pull/128164
If possible, put the definition next to the definition of an adjacent
declaration. For example:
struct S {
void f^oo1() {}
void foo2();
void f^oo3() {}
};
// S::foo1() goes here
void S::foo2() {}
// S:
ckandeler wrote:
> 2. A more general musing: it would be nice to have a mechanism for storing
> additional information for a subset of symbols, without incurring the
> overhead of increasing the representation size of **every** symbol. If we had
> such a mechanism, we could cut down the overhe
ckandeler wrote:
*sigh*
I want to use clangd for this purpose because it produces correct results
particularly with non-trivial constructs, so I'm afraid
that using such textual heuristics would kill that advantage.
I'll give it a try, though.
https://github.com/llvm/llvm-project/pull/118102
ckandeler wrote:
My main motivation is to get DefineOutline out of the proof-of-concept stage
where it just dumps the definition somewhere in the same namespace.
Usually, the location that best fits the user's expectation is next to the
definition of an adjacent declaration. If that adjacent d
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
https://github.com/ckandeler closed
https://github.com/llvm/llvm-project/pull/112525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ckandeler wrote:
Addressed review comments.
https://github.com/llvm/llvm-project/pull/112525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -423,8 +427,6 @@ bool childExprIsStmt(const Stmt *Outer, const Expr *Inner) {
if (!Outer || !Inner)
return false;
// Exclude the most common places where an expr can appear but be unused.
- if (llvm::isa(Outer))
ckandeler wrote:
I made the comment
https://github.com/ckandeler updated
https://github.com/llvm/llvm-project/pull/112525
>From 9993b1488c26b8296d3bb46b83e9c2f133d76c2d Mon Sep 17 00:00:00 2001
From: Christian Kandeler
Date: Tue, 23 May 2023 13:16:38 +0200
Subject: [PATCH] [clangd] Consider expression statements in ExtractVariabl
ckandeler wrote:
Rebased.
https://github.com/llvm/llvm-project/pull/112525
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ckandeler updated
https://github.com/llvm/llvm-project/pull/112525
>From 83104569563db9a6716aae941edf9fe15493081a Mon Sep 17 00:00:00 2001
From: Christian Kandeler
Date: Tue, 23 May 2023 13:16:38 +0200
Subject: [PATCH] [clangd] Consider expression statements in ExtractVariabl
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
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
https://github.com/ckandeler updated
https://github.com/llvm/llvm-project/pull/118102
>From 188cbf1a7d3e83c0a558550351a373c1c3475d4e 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
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
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
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
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
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
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
@@ -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
@@ -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
@@ -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
__
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
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
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
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
@@ -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
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
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
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
@@ -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
+
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
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
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
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
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
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
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
@@ -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
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
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
__
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
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
@@ -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
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
___
@@ -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)
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
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
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
@@ -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
@@ -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
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
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
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
_
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
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
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
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
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
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
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
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
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
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
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
..
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
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
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
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
..
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
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
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
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
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
..
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
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
@@ -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:
@@ -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:
@@ -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:
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
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
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
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
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
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
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
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
@@ -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:
@@ -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...]() {} ]];
@@ -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
@@ -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
_
@@ -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
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
@@ -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:
1 - 100 of 116 matches
Mail list logo