torshepherd wrote:
It's been a while since I looked at this, but from what I remember my attempt
to fix the last part didn't quite work as expected. I can try to test it again,
but I ended up just abandoning it at the time since I didn't really miss the
functionality as much as I thought
http
torshepherd wrote:
Accepted the comment and added relnotes. Lmk if you need anything else prior to
merge
https://github.com/llvm/llvm-project/pull/95712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From ee08d8cc7760fe39637260408aec2b1e6ab30d0a Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 23 Sep 2024 23:12:23 -0400
Subject: [PATCH 1/7] just defaults
---
clang-tools-extra/clangd/Config.h
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From 2c9e7c16524b7ce3bf818e451279722dc45d3efc Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 23 Sep 2024 23:12:23 -0400
Subject: [PATCH 1/6] just defaults
---
clang-tools-extra/clangd/Config.h
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From 2c9e7c16524b7ce3bf818e451279722dc45d3efc Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 23 Sep 2024 23:12:23 -0400
Subject: [PATCH 1/5] just defaults
---
clang-tools-extra/clangd/Config.h
torshepherd wrote:
Ok I found a couple of nontrivial issues that I took care of in the latest
commit.
1. Using `DefaultArguments` required having parameter names set to true as
well. I separated them so that both have a modality that works with or without
the other. See screenshot for default
torshepherd wrote:
Ping
https://github.com/llvm/llvm-project/pull/95712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
torshepherd wrote:
I'll try to rectify this; for now you can add
tor [dot] aksel [dot] shepherd [at] gmail [dot] com
https://github.com/llvm/llvm-project/pull/78999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
torshepherd wrote:
@5chmidti this should be ready for merge
https://github.com/llvm/llvm-project/pull/78999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From 2c9e7c16524b7ce3bf818e451279722dc45d3efc Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 23 Sep 2024 23:12:23 -0400
Subject: [PATCH 1/4] just defaults
---
clang-tools-extra/clangd/Config.h
@@ -755,12 +812,33 @@ class InlayHintVisitor : public
RecursiveASTVisitor {
bool NameHint = shouldHintName(Args[I], Name);
bool ReferenceHint = shouldHintReference(Params[I], ForwardedParams[I]);
+ bool IsDefault = isa(Args[I]);
torshepherd w
torshepherd wrote:
> Hmm another case to consider:
>
> 
In this case the argument is unnamed. I think for this I should just insert `/*
unused */` or `/* unnamed */` ?
https://github.com/llvm/llvm-project/pull/
torshepherd wrote:
Darn, this was just closed last week as I put up an issue
https://github.com/llvm/llvm-project/issues/110390 ðŸ˜
Clang-pseudo was just removed:
https://github.com/llvm/llvm-project/pull/80081#issuecomment-2361060164
Is the plan to refactor now and re-put this up?
https://g
https://github.com/torshepherd edited
https://github.com/llvm/llvm-project/pull/95712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/torshepherd edited
https://github.com/llvm/llvm-project/pull/95712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From 2c9e7c16524b7ce3bf818e451279722dc45d3efc Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 23 Sep 2024 23:12:23 -0400
Subject: [PATCH] just defaults
---
clang-tools-extra/clangd/Config.h
https://github.com/torshepherd edited
https://github.com/llvm/llvm-project/pull/95712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/78999
>From 718e26db063980e2296f3817381befc119294b64 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Sun, 21 Jan 2024 17:53:31 -0500
Subject: [PATCH 1/3] [clangd] Swap binary operands
---
.../clangd/refactor/tw
torshepherd wrote:
> Could you add a release note for this as well?
>
> * please bring the branch up to date with main
Where do I add clangd release notes?
https://github.com/llvm/llvm-project/pull/78999
___
cfe-commits mailing list
cfe-commits@l
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/78999
>From 718e26db063980e2296f3817381befc119294b64 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Sun, 21 Jan 2024 17:53:31 -0500
Subject: [PATCH] [clangd] Swap binary operands
---
.../clangd/refactor/tweaks
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From 07e5dcc71dc20c9d7482fc076cbeeb5e97a797d7 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Wed, 19 Jun 2024 09:55:34 -0400
Subject: [PATCH 1/2] after comments
---
clang-tools-extra/clangd/Config.h
torshepherd wrote:
Ok I took a stab at doing lambda captures as hover instead.
- Targeting the exact '=' or '&' is nontrivial since the capture list isn't in
the AST, the lambda is just `LambdaExpr` with children for the parameters and
the CompoundStmt body.
- `auto MyLambda = [...` already pr
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From 3830a49faf5e20781f864d459f5478221740ac3d Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Wed, 19 Jun 2024 09:55:34 -0400
Subject: [PATCH 1/2] after comments
---
clang-tools-extra/clangd/Config.h
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From 3830a49faf5e20781f864d459f5478221740ac3d Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Wed, 19 Jun 2024 09:55:34 -0400
Subject: [PATCH 1/2] after comments
---
clang-tools-extra/clangd/Config.h
@@ -372,6 +382,34 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+llvm::StringRef getLambdaCaptureName(const LambdaCapture &Capture) {
+ if (Capture.capturesVariable())
+return Capture.getCapturedVar()->getName();
+ if (Capture.capturesThis
@@ -372,6 +382,34 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+llvm::StringRef getLambdaCaptureName(const LambdaCapture &Capture) {
+ if (Capture.capturesVariable())
+return Capture.getCapturedVar()->getName();
+ if (Capture.capturesThis
@@ -15,9 +15,12 @@
#include "support/Context.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ScopedPrinter.h"
+#include "llvm/Support/raw_ostream.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
+#include
#include
+#include
torshepherd wrote
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From 3830a49faf5e20781f864d459f5478221740ac3d Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Wed, 19 Jun 2024 09:55:34 -0400
Subject: [PATCH 1/2] after comments
---
clang-tools-extra/clangd/Config.h
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/95712
>From 77bb21454b2110bed491689a4c323cff1c745207 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Sun, 16 Jun 2024 10:54:43 -0400
Subject: [PATCH] Add default arguments and lambda captures only
---
clang-too
@@ -504,10 +503,10 @@ struct FragmentCompiler {
auto Fast = isFastTidyCheck(Str);
if (!Fast.has_value()) {
diag(Warning,
- llvm::formatv(
- "Latency of clang-tidy check '{0}' is not known. "
- "It will only run if
@@ -1568,7 +1626,7 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
)cpp";
llvm::StringRef VectorIntPtr = R"cpp(
-vector array;
+vector $init[[array]];
torshepherd wrote:
Another artifact, sorry
https://github.com/llvm/llvm-project/pull/95712
@@ -1458,13 +1463,66 @@ TEST(TypeHints, DefaultTemplateArgs) {
struct A {};
A foo();
auto $var[[var]] = foo();
-A bar[1];
+A baz;
+A bar[1]{};
torshepherd wrote:
My fault, an artifact from a different set of inlay hints I decided not to
@@ -15,9 +15,12 @@
#include "support/Context.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ScopedPrinter.h"
+#include "llvm/Support/raw_ostream.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
+#include
#include
+#include
torshepherd wrote
torshepherd wrote:
Aha, that's a great suggestion. I agree that beyond the trivial case of 2
captured variables it gets a bit noisy. On-hover would be quite nice though!
To clarify, you mean hovering over the default capture '=' or '&' right?
I'm happy to remove the lambdas from this PR in fav
https://github.com/torshepherd created
https://github.com/llvm/llvm-project/pull/95712
Title. This PR adds support for showing implicit lambda captures:

and defaulted function arguments:
![imag
torshepherd wrote:
@HighCommander4 I've pushed up the change that doesn't allow conflicting
fixits. I'll now be smoke-testing this over the coming weeks while I work, but
consider it ready for review again whenever you have a chance
https://github.com/llvm/llvm-project/pull/79867
_
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/79867
>From 94dee94becb7d79b087e183754602e08a5c4669d Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 29 Jan 2024 11:44:25 -0500
Subject: [PATCH 1/2] [clangd] Add fix-all CodeActions
---
clang-tools-extra/c
torshepherd wrote:
Ah, awesome. In that case note that I'll make the option not show up when
changes would have conflicting overlap ranges
https://github.com/llvm/llvm-project/pull/79867
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://
torshepherd wrote:
Ping
https://github.com/llvm/llvm-project/pull/78999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
torshepherd wrote:
Bump @HighCommander4 - did you get a chance to review this?
I've been using this with great success in my local build for several months
now, and the feature is _extremely_ handy.
There is a slight bug that overlapping fixes are troublesome if you choose
"clangd apply all",
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/79867
>From 94dee94becb7d79b087e183754602e08a5c4669d Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 29 Jan 2024 11:44:25 -0500
Subject: [PATCH] [clangd] Add fix-all CodeActions
---
clang-tools-extra/clang
torshepherd wrote:
Ping
https://github.com/llvm/llvm-project/pull/79867
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/78999
>From 6abe2b5af090329bfca42d144597fbd5ca41d511 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Sun, 21 Jan 2024 17:53:31 -0500
Subject: [PATCH] [clangd] Swap binary operands
---
.../clangd/refactor/tweaks
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/79867
>From 636e8286b38839c9d90e9eb147ba59d588c3241c Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 29 Jan 2024 11:44:25 -0500
Subject: [PATCH] [clangd] Add fix-all CodeActions
---
clang-tools-extra/clang
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/78999
>From c22c4fc969af0860b1fb2c371d31c2757da70e01 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Sun, 21 Jan 2024 17:53:31 -0500
Subject: [PATCH 1/2] swap binary
---
.../clangd/refactor/tweaks/CMakeLists.tx
torshepherd wrote:
Also pinging @kadircet who recently worked on Include Cleaner's similar batch
fixes
https://github.com/llvm/llvm-project/pull/79867
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/79867
>From 7cb9e7b604a16414f31309b59747abbd7d3c0025 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 29 Jan 2024 11:44:25 -0500
Subject: [PATCH] [clangd] Add fix-all CodeActions
---
clang-tools-extra/clang
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/79867
>From 0ed7667a5b48064a492f7f125a4002912a35fec7 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Mon, 29 Jan 2024 11:44:25 -0500
Subject: [PATCH 1/2] initial cut
---
clang-tools-extra/clangd/Diagnostics.cpp
https://github.com/torshepherd edited
https://github.com/llvm/llvm-project/pull/79867
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/torshepherd edited
https://github.com/llvm/llvm-project/pull/79867
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
torshepherd wrote:
Hmm I noticed another mini-issue. Ideally we shouldn't have a 'fix all clangd'
quick fix if all of the issues come from the same source, only the 'fix all _'
option
https://github.com/llvm/llvm-project/pull/79867
___
cfe-commits ma
torshepherd wrote:
Also, I noticed that the conversion function `toCodeAction(const Fix& F, ...)`
specifically hardcodes all Fix objects to `QUICKFIX_KIND`. When we do
https://github.com/clangd/clangd/issues/1446, it would be good to add a string
for `SOURCE_FIX_ALL_KIND` and set these fix-all
torshepherd wrote:
Another thing that would be nice to solve in a follow-up (applies to unused
includes as well btw) is to clean up the list of fixes when someone selects all
and presses quick fix:
.
See in the unit tests, when all quick fixes are of the same `code`,
`isPreferred` will be true. However, this doesn't seem to ch
https://github.com/torshepherd updated
https://github.com/llvm/llvm-project/pull/78999
>From c22c4fc969af0860b1fb2c371d31c2757da70e01 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Sun, 21 Jan 2024 17:53:31 -0500
Subject: [PATCH 1/2] swap binary
---
.../clangd/refactor/tweaks/CMakeLists.tx
https://github.com/torshepherd created
https://github.com/llvm/llvm-project/pull/78999
This MR resolves https://github.com/llvm/llvm-project/issues/78998
>From c22c4fc969af0860b1fb2c371d31c2757da70e01 Mon Sep 17 00:00:00 2001
From: Tor Shepherd
Date: Sun, 21 Jan 2024 17:53:31 -0500
Subject: [P
63 matches
Mail list logo