[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-07-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > Do I understand correctly that, as a result of this commit, the SemaTests > > target no longer exists, and to work on / run the tests that it used to > > include (such as HeuristicResolverTest.cpp), I have to build the > > ClangdUnitTests target, which requires buildi

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-07-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Given that we haven't heard objections, I think we should proceed with using resolved paths in `IncludeInserter` as well. It would probably be best to do that before the clangd 21 release, so that we don't ship a release where two different features are interpreting the c

[clang-tools-extra] [clangd][NFC] fix broken documentation link (PR #147088)

2025-07-07 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/147088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/143345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/143345 >From ccb46000da10ec57f0aec4f35d123f0bee03a151 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 9 Jun 2025 00:58:47 -0400 Subject: [PATCH] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeCom

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-05 Thread Nathan Ridge via cfe-commits
@@ -93,6 +94,12 @@ class HeuristicResolver { // during simplification, and the operation fails if no pointer type is found. QualType simplifyType(QualType Type, const Expr *E, bool UnwrapPointer); + // Given an expression `Fn` representing the callee in a function call,

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/143345 >From 8884279a3cff027db08eb6d801227cb21e3de220 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 9 Jun 2025 00:58:47 -0400 Subject: [PATCH] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeCom

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Though part of me is curious about which bug was caught :) The bug was that [this branch](https://github.com/HighCommander4/llvm-project/blob/2211dbf5b3167797ec2e5bf4db5adc13427d3e7b/clang/lib/Sema/HeuristicResolver.cpp#L522) was using `Fn` (before `IgnoreParenCasts` un

[clang-tools-extra] [clangd][NFC] fix broken documentation link (PR #147088)

2025-07-04 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/147088 None >From 4e7f72e796922f5783007b06190d4d165bccbb59 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 4 Jul 2025 19:53:32 +0300 Subject: [PATCH] [clangd][NFC] fix broken documentation link --- cla

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-02 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Updated patch to add dedicated `HeuristicResolver` tests. And I did catch a bug in the unified implementation in the process, so thank you for suggesting it:) https://github.com/llvm/llvm-project/pull/143345 ___ cfe-commits maili

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-02 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review https://github.com/llvm/llvm-project/pull/143345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-02 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/143345 >From 2211dbf5b3167797ec2e5bf4db5adc13427d3e7b Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 9 Jun 2025 00:58:47 -0400 Subject: [PATCH] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeCom

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-07-01 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/146258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-06-30 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: To work on unit tests found in `clang/unittests/Sema`, I used to be able to build a target named `SemaTests`, which only required building a handful of test source files. Do I understand correctly that, as a result of this commit, the `SemaTests` target no longer exists,

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. The new test + other updates look great, thanks! I agree with using the terminology "explicit object parameter", as this is what appears in the clang API (e.g. `ParmVarDecl::isExplicitObjectParameter()`). @MythreyaK I'll hold off on

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > [...] people like to **also** ask for a test to be added to libSema's own > code completion test suite. These tests work a bit differently: they're found > at `clang/test/CodeCompletion` (see for example [this > file](https://searchfox.org/llvm/source/clang/test/CodeCom

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/146258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/146258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/146258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Nathan Ridge via cfe-commits
@@ -4363,6 +4363,35 @@ TEST(CompletionTest, PreambleFromDifferentTarget) { EXPECT_THAT(Result.Completions, Not(testing::IsEmpty())); EXPECT_THAT(Signatures.signatures, Not(testing::IsEmpty())); } + +TEST(CompletionTest, DeducingThisIgnoreSelf) { + Annotations Test(R"cpp( +

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 commented: Thanks! This is a nice and simple fix. * It fixes the main issue as originally reported. * It fixes the additional issue discussed in [this comment](https://github.com/clangd/clangd/issues/2339#issuecomment-2709036107), taking the second approach

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/146258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] `--header-insertion` CLI fix (PR #146235)

2025-06-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/146235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] `--header-insertion` CLI fix (PR #146235)

2025-06-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/146235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Implement simple folding for preprocessor branches (PR #140959)

2025-06-23 Thread Nathan Ridge via cfe-commits
@@ -220,6 +220,24 @@ getFoldingRanges(const std::string &Code, bool LineFoldingOnly) { auto EndPosition = [&](const Token &T) { return offsetToPosition(Code, EndOffset(T)); }; + + // Preprocessor directives HighCommander4 wrote: A couple of minor poi

[clang-tools-extra] [clangd] Implement simple folding for preprocessor branches (PR #140959)

2025-06-23 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for adding some unit tests, and sorry I didn't get a chance to look at this sooner. Unfortunately, it looks like the patch needs a bit more work, as I'm seeing it crash on incomplete code, for example: ```c++ #if

[clang-tools-extra] [clangd] Implement simple folding for preprocessor branches (PR #140959)

2025-06-23 Thread Nathan Ridge via cfe-commits
@@ -220,6 +220,24 @@ getFoldingRanges(const std::string &Code, bool LineFoldingOnly) { auto EndPosition = [&](const Token &T) { return offsetToPosition(Code, EndOffset(T)); }; + + // Preprocessor directives + auto PPRanges = pairDirectiveRanges(DirectiveStructure, Or

[clang-tools-extra] [clangd] Implement simple folding for preprocessor branches (PR #140959)

2025-06-23 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/140959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-06-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @kleinesfilmroellchen (or anyone else reading this thread), any objection to switching to the approach suggested by Kadir in the previous comment, of matching against resolved paths? https://github.com/llvm/llvm-project/pull/140594

[clang-tools-extra] [clangd] Add languages as server capabilities (PR #75633)

2025-06-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. (marking 'request changes' per discussion in previous comments) https://github.com/llvm/llvm-project/pull/75633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang-tools-extra] [clangd] Add languages as server capabilities (PR #75633)

2025-06-15 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > IIUC, we're trying to figure out if clangd should be used for documents for > language `X`. We need to figure this out **before** clangd's proper > initialization, so that we can decide which `documentSelector`s to provide. Thanks, that's a good point that I overlooked!

[clang-tools-extra] [clangd] Add languages as server capabilities (PR #75633)

2025-06-10 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Using `"ServerCapabilities.experimental"` sounds reasonable to me. https://github.com/llvm/llvm-project/pull/75633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-06-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 converted_to_draft https://github.com/llvm/llvm-project/pull/143345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-06-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Do we also want to add some tests? Yeah, good point. The two separate implementations did have test coverage in their respective components (CodeComplete and clangd), but `HeuristicResolver` has its own test suite so it would be better to have some tests for it there as

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-06-08 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Apologies for not having had a chance to circle back to this sooner. I read over the discussion of the [original patch](https://github.com/llvm/llvm-project/pull/67749) that added support for the `QuotedHeaders` and `AngledHeaders` config keys, and it turns out the "reso

[clang-tools-extra] [clangd] Guard against trivial FunctionProtoTypeLoc when creating inlay hints (PR #143087)

2025-06-08 Thread Nathan Ridge via cfe-commits
@@ -368,6 +368,14 @@ static FunctionProtoTypeLoc getPrototypeLoc(Expr *Fn) { } if (auto F = Target.getAs()) { +// In some edge cases the AST can contain a "trivial" FunctionProtoTypeLoc HighCommander4 wrote: Posted https://github.com/llvm/llvm-project

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-06-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/143345 HeuristicResolver houses the unified implementation. Fixes https://github.com/llvm/llvm-project/issues/143240 >From 4c65b2a50e8ea0592459c11a775723b5759ef31e Mon Sep 17 00:00:00 2001 From: Nathan Ridge D

[clang-tools-extra] [clangd] Guard against trivial FunctionProtoTypeLoc when creating inlay hints (PR #143087)

2025-06-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/143087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Guard against trivial FunctionProtoTypeLoc when creating inlay hints (PR #143087)

2025-06-07 Thread Nathan Ridge via cfe-commits
@@ -368,6 +368,14 @@ static FunctionProtoTypeLoc getPrototypeLoc(Expr *Fn) { } if (auto F = Target.getAs()) { +// In some edge cases the AST can contain a "trivial" FunctionProtoTypeLoc +// which has null parameters. Avoid these as they don't contain useful +//

[clang-tools-extra] [clangd] Guard against trivial FunctionProtoTypeLoc when creating inlay hints (PR #143087)

2025-06-07 Thread Nathan Ridge via cfe-commits
@@ -368,6 +368,14 @@ static FunctionProtoTypeLoc getPrototypeLoc(Expr *Fn) { } if (auto F = Target.getAs()) { +// In some edge cases the AST can contain a "trivial" FunctionProtoTypeLoc HighCommander4 wrote: Thanks for the reminder about this. Now tha

[clang-tools-extra] [clangd] Guard against trivial FunctionProtoTypeLoc when creating inlay hints (PR #143087)

2025-06-07 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/143087 >From 26071d82cd4084b969e6cb2d0eac046c950c982a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 6 Jun 2025 03:56:59 -0400 Subject: [PATCH] [clangd] Guard against trivial FunctionProtoTypeLoc when c

[clang-tools-extra] [clangd] Guard against trivial FunctionProtoTypeLoc when creating inlay hints (PR #143087)

2025-06-06 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/143087 Fixes https://github.com/llvm/llvm-project/issues/142608 >From f44f250259cd09b20f6ab9095fc3718537d51563 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 6 Jun 2025 03:56:59 -0400 Subject: [PATCH] [

[clang-tools-extra] [clangd] Log the paths of loaded config files without --log=verbose (PR #142063)

2025-05-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/142063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-05-30 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Carrying over review request to @kadircet from the original combined patch at https://github.com/llvm/llvm-project/pull/128591#issuecomment-2782334206: > @kadircet, you were involved with earlier rounds of review on the old patch > (https://reviews.llvm.org/D143112) and d

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-05-27 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Any update about the issue that I reported above? You may want to open a new issue to track that, so it can get annotated with the appropriate labels (e.g. `rejects-valid`) and get more attention by showing up on issues lists / dashboards that people may be watching. h

[clang-tools-extra] [clangd] Add support for textDocument/rangesFormatting (PR #141208)

2025-05-26 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! (Previously reviewed in https://github.com/llvm/llvm-project/pull/80180.) https://github.com/llvm/llvm-project/pull/141208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-25 Thread Nathan Ridge via cfe-commits
@@ -262,6 +264,8 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) { TU.Filename = "main.cpp"; TU.AdditionalFiles["a.h"] = guard("#include \"b.h\""); TU.AdditionalFiles["b.h"] = guard("void b();"); + TU.AdditionalFiles["a_angled.h"] = guard("#include \"b_angled.h\"");

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/140594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > But since we have both config options, maybe there is a reason for > > overwrites in this direction as well. > > Hmm, I was mainly focusing on the quoted -> angled case, hence why only the > `AngledHeaders` filter is used. But I have to agree that following the config

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-22 Thread Nathan Ridge via cfe-commits
@@ -297,7 +301,8 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) { Findings.UnusedIncludes.clear(); std::vector Diags = issueIncludeCleanerDiagnostics( AST, TU.Code, Findings, MockFS(), - {[](llvm::StringRef Header) { return Header.ends_with("buzz.h"); }}); +

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-22 Thread Nathan Ridge via cfe-commits
@@ -306,6 +311,12 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) { withFix({Fix(MainFile.range("insert_b"), "#include \"b.h\"\n", "#include \"b.h\""), FixMessage("add all missing includes")})), +

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-22 Thread Nathan Ridge via cfe-commits
@@ -262,6 +264,8 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) { TU.Filename = "main.cpp"; TU.AdditionalFiles["a.h"] = guard("#include \"b.h\""); TU.AdditionalFiles["b.h"] = guard("void b();"); + TU.AdditionalFiles["a_angled.h"] = guard("#include \"b_angled.h\"");

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-22 Thread Nathan Ridge via cfe-commits
@@ -142,6 +143,13 @@ std::vector generateMissingIncludeDiagnostics( llvm::StringRef HeaderRef{Spelling}; bool Angled = HeaderRef.starts_with("<"); +for (auto Filter : AngledHeaders) { HighCommander4 wrote: nit: iterate using `auto &`, the way we d

[clang-tools-extra] [clangd] Drop the optimization where only shards for modified files are updated in the background index (PR #140651)

2025-05-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 converted_to_draft https://github.com/llvm/llvm-project/pull/140651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Drop the optimization where only shards for modified files are updated in the background index (PR #140651)

2025-05-20 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I am afraid this doesn't address > [clangd/clangd#1104](https://github.com/clangd/clangd/issues/1104) to a > useful extent :/. > > Whenever a header `foo.h` changes, clangd will schedule indexing of only a > **single** translation unit that depends on it, not all of th

[clang-tools-extra] [clangd] Drop the optimization where only shards for modified files are updated in the background index (PR #140651)

2025-05-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/140651 >From 7f48d903c6d5f97a75208c799e0e96a26948af05 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 17 May 2025 22:11:45 -0400 Subject: [PATCH 1/2] [clangd] Drop the optimization where only shards for

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2025-05-20 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > @HighCommander4 I'm just wondering, have you had a chance to check out this > PR yet? If not, is there any chance you could find some time for it in the > coming weeks or months? My apologies, this has been languishing in my review queue and I haven't quite managed to

[clang-tools-extra] [clangd] Drop the optimization where only shards for modified files are updated in the background index (PR #140651)

2025-05-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/140651 >From 7f48d903c6d5f97a75208c799e0e96a26948af05 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 17 May 2025 22:11:45 -0400 Subject: [PATCH] [clangd] Drop the optimization where only shards for modif

[clang-tools-extra] [clangd] Drop the optimization where only shards for modified files are updated in the background index (PR #140651)

2025-05-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/140651 The optimization is not valid, given that the target of a symbol reference can change without the spelling of the reference (or anything else in the file containing the reference) changing, as illustrate

[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)

2025-05-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > @kleinesfilmroellchen @HighCommander4 would it be possible to take a look > when you have some time? Many thanks! Yep, will do. Added myself as reviewer. https://github.com/llvm/llvm-project/pull/140594 ___ cfe-commits mailing

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-05-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > If you're looking for a clangd reviewer, perhaps one of our other clangd > maintainers, @llvm-beanz or @kadircet, could help with this one. (I realized you are probably not able to edit the Reviewers field, so I went ahead and added the mentioned folks.) https://github

[clang-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-15 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > LGTM if HighCommander4 is happy. Apologies, folks, I'm backlogged on reviews and probably won't have time to look at this for a while. If you're looking for a clangd reviewer, perhaps one of our other clangd maintainers, @llvm-beanz or @kadircet, could help with this o

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-12 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @Noustaa if you'd like to also submit a documentation patch for https://clangd.llvm.org/config.html (source at https://github.com/llvm/clangd-www/blob/main/config.md), that would be appreciated! https://github.com/llvm/llvm-project/pull/137613 ___

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/137613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks, LGTM! (I made one small tweak, to ConfigFragment.h, to refer to the config option values `All` and `None` with correct capitalization.) https://github.com/llvm/llvm-project/pull/137613 ___

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/137613 >From 7e715447d242d7e409e02059d2948fb3417fb00f Mon Sep 17 00:00:00 2001 From: Noustaa Date: Mon, 28 Apr 2025 12:38:36 +0200 Subject: [PATCH 1/5] [clangd] Add CodePatterns config option under Completion A

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-11 Thread Nathan Ridge via cfe-commits
@@ -267,6 +267,17 @@ opt HeaderInsertion{ "Never insert #include directives as part of code completion")), }; +opt CodePatterns{ HighCommander4 wrote: We've been moving towards having configuration specified only in the config file, not on the co

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-11 Thread Nathan Ridge via cfe-commits
@@ -950,6 +951,11 @@ struct CompletionRecorder : public CodeCompleteConsumer { // Retain the results we might want. for (unsigned I = 0; I < NumResults; ++I) { auto &Result = InResults[I]; + if (Config::current().Completion.CodePatterns == + Conf

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/137613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks, the patch and tests look pretty good. I think we should leave out the command-line arg, but otherwise should be good to go. https://github.com/llvm/llvm-project/pull/137613

[clang] [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (PR #139489)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/139489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] allow implicit completion inside empty template argument list (PR #138846)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Looks reasonable to me, but the buildkite run is showing `AllowImplicitCompletions.All` is currently failing https://github.com/llvm/llvm-project/pull/138846 ___ cfe-commits mai

[clang-tools-extra] allow implicit completion inside empty template argument list (PR #138846)

2025-05-11 Thread Nathan Ridge via cfe-commits
@@ -2455,6 +2455,11 @@ bool isIncludeFile(llvm::StringRef Line) { } bool allowImplicitCompletion(llvm::StringRef Content, unsigned Offset) { + // Check if we're inside an empty template argument list HighCommander4 wrote: nit: for consistency with the other

[clang-tools-extra] allow implicit completion inside empty template argument list (PR #138846)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/138846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (PR #139489)

2025-05-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (This came up during https://github.com/llvm/llvm-project/issues/139019 as a potential diagnosis, but it does not fix the crash. As mentioned, no one was in fact moving from the arguments, so passing them by rvalue reference and forwarding them multiple times in the same

[clang] [clang][AST] Pass ProfileArguments by value in findSpecialization{Impl,Locally} (PR #139489)

2025-05-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/139489 The arguments passed are lightweight (an ArrayRef and a pointer), and findSpecializationImpl passes them to multiple functions, making it a potential hazard to pass them by rvalue reference (even though

[clang] [clang][Index] Add comment about out-of-line defaulted destructor (PR #138640)

2025-05-06 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/138640 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial

[clang] [clang][Index] Add comment about out-of-line defaulted destructor (PR #138640)

2025-05-06 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/138640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Index] Add comment about out-of-line defaulted destructor (PR #138640)

2025-05-06 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/138640 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial

[clang] [clang][Index] Use HeuristicResolver in libIndex (PR #125153)

2025-05-05 Thread Nathan Ridge via cfe-commits
@@ -25,6 +26,17 @@ static bool isGeneratedDecl(const Decl *D) { return false; } +IndexingContext::IndexingContext(IndexingOptions IndexOpts, + IndexDataConsumer &DataConsumer) +: IndexOpts(IndexOpts), DataConsumer(DataConsumer) {} + +Index

[clang] [clang][Index] Add comment about out-of-line defaulted destructor (PR #138640)

2025-05-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Per discussion at https://github.com/llvm/llvm-project/pull/125153#discussion_r2074478720 https://github.com/llvm/llvm-project/pull/138640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang][Index] Add comment about out-of-line defaulted destructor (PR #138640)

2025-05-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/138640 None >From eeeb71e72e3d5e9da5227b0f2f1d6e870e393a7c Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 6 May 2025 02:50:47 -0400 Subject: [PATCH] [clang][Index] Add comment about out-of-line defaulte

[clang] [clang][Index] Use HeuristicResolver in libIndex (PR #125153)

2025-05-05 Thread Nathan Ridge via cfe-commits
@@ -25,6 +26,17 @@ static bool isGeneratedDecl(const Decl *D) { return false; } +IndexingContext::IndexingContext(IndexingOptions IndexOpts, + IndexDataConsumer &DataConsumer) +: IndexOpts(IndexOpts), DataConsumer(DataConsumer) {} + +Index

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-05-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/133681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-05-04 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > There is 2 different features involved here. > > [...] > > In the feature i'm trying to implement, number 1 should be OFF if > CodePatterns is set to None but number 2 should still be working. That makes sense to me, as a user expectation. The code I linked to in my pr

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-05-04 Thread Nathan Ridge via cfe-commits
@@ -158,6 +159,42 @@ TEST(StdLibTests, EndToEnd) { UnorderedElementsAre(StdlibSymbol("list"), StdlibSymbol("vector"))); } +TEST(StdLibTests, StdLibDocComments) { + Config Cfg; + Cfg.Index.StandardLibrary = true; + WithContextValue Enabled(Config::Key, std::move(Cfg));

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-05-04 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/133681 >From ce15317543b135b7aa86d4987fb0c25abd597d56 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 31 Mar 2025 02:25:45 -0400 Subject: [PATCH] [clangd] Store documentation when indexing standard librar

[clang-tools-extra] [clangd] Add container field to remote index Refs grpc method (PR #71605)

2025-05-01 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/71605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add container field to remote index Refs grpc method (PR #71605)

2025-05-01 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Thanks! I'll go ahead and merge. https://github.com/llvm/llvm-project/pull/71605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)

2025-04-30 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Code autocomplete works just fine with CodePatterns::None but include > autocomplete does not work anymore. Gonna investigate when i have some time. I guess the preprocessor completions are all `RK_Pattern` (added [here](https://searchfox.org/llvm/rev/2f976956e5ccef5664

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-30 Thread Nathan Ridge via cfe-commits
@@ -158,6 +158,43 @@ TEST(StdLibTests, EndToEnd) { UnorderedElementsAre(StdlibSymbol("list"), StdlibSymbol("vector"))); } +TEST(StdLibTests, StdLibDocComments) { + Config Cfg; + Cfg.Index.StandardLibrary = true; + WithContextValue Enabled(Config::Key, std::move(Cfg));

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-30 Thread Nathan Ridge via cfe-commits
@@ -223,33 +226,26 @@ SymbolSlab indexStandardLibrary(llvm::StringRef HeaderSources, return Symbols; } - SymbolCollector::Options IndexOpts; - IndexOpts.Origin = SymbolOrigin::StdLib; - IndexOpts.CollectMainFileSymbols = false; - IndexOpts.CollectMainFileRefs = fals

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/133681 >From 451a88947bda87daa5934cc5c2d55f9e57a5cfda Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 31 Mar 2025 02:25:45 -0400 Subject: [PATCH] [clangd] Store documentation when indexing standard librar

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-27 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Addressed review comments https://github.com/llvm/llvm-project/pull/133681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-27 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/133681 >From aab6aef62b7691290f02b0dd29b0071f428502c9 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 31 Mar 2025 02:25:45 -0400 Subject: [PATCH] [clangd] Store documentation when indexing standard librar

[clang-tools-extra] [clangd] Add container field to remote index Refs grpc method (PR #71605)

2025-04-26 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Yes this is good to go Could you rebase it to apply to latest trunk please? I'm happy to go ahead and merge it then. https://github.com/llvm/llvm-project/pull/71605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang-tools-extra] [clangd] Strip invalid fromRanges for outgoing calls (PR #134657)

2025-04-24 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Thanks; I'll go ahead and merge. https://github.com/llvm/llvm-project/pull/134657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Strip invalid fromRanges for outgoing calls (PR #134657)

2025-04-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/134657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add `HeaderInsertion` yaml config option (PR #128503)

2025-04-23 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > unfortunately, LLVM's command-line argument framework doesn't allow us to > distinguish between "the option's value is `IWYU` because the flag > `--header-insertion=iwyu` appeared in the command line" and "the option's > value is `IWYU` because no `--header-insertion` f

[clang-tools-extra] [clangd] Improve `BlockEnd` inlayhint presentation (PR #136106)

2025-04-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/136106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   7   8   9   10   >