[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

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

2025-04-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Looks good, thank you! 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

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

2025-04-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited 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

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

2025-04-21 Thread Nathan Ridge via cfe-commits
@@ -2305,7 +2335,45 @@ TEST(BlockEndHints, PointerToMemberFunction) { $ptrmem[[}]] } // suppress )cpp", - ExpectedHint{" // if", "ptrmem"}); + ExpectedHint{" // if ()", "ptrmem"}); +} + +TEST(BlockEndHints, MinLineLimit) { +

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

2025-04-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited 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

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

2025-04-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited 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

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

2025-04-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited 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

[clang-tools-extra] [clangd] IncludeCleaner include not found error now contains path (PR #136237)

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

[clang-tools-extra] [clangd] IncludeCleaner include not found error now contains path (PR #136237)

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

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

2025-04-20 Thread Nathan Ridge via cfe-commits
@@ -22,10 +22,16 @@ namespace clang { namespace clangd { class ParsedAST; +struct InlayHintOptions { + // Minimum lines for BlockEnd inlay-hints to be shown HighCommander4 wrote: Let's make this comment a bit more specific: ``` // Minimum height of a code b

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

2025-04-20 Thread Nathan Ridge via cfe-commits
@@ -2305,7 +2335,45 @@ TEST(BlockEndHints, PointerToMemberFunction) { $ptrmem[[}]] } // suppress )cpp", - ExpectedHint{" // if", "ptrmem"}); + ExpectedHint{" // if ()", "ptrmem"}); +} + +TEST(BlockEndHints, MinLineLimit) { +

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

2025-04-20 Thread Nathan Ridge via cfe-commits
@@ -22,10 +22,16 @@ namespace clang { namespace clangd { class ParsedAST; +struct InlayHintOptions { + // Minimum lines for BlockEnd inlay-hints to be shown + int HintMinLineLimit{2}; HighCommander4 wrote: What we discussed in the original issue was that th

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

2025-04-20 Thread Nathan Ridge via cfe-commits
@@ -2305,7 +2335,45 @@ TEST(BlockEndHints, PointerToMemberFunction) { $ptrmem[[}]] } // suppress )cpp", - ExpectedHint{" // if", "ptrmem"}); + ExpectedHint{" // if ()", "ptrmem"}); +} + +TEST(BlockEndHints, MinLineLimit) { +

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

2025-04-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for picking up this patch! Looks fairly good, just a few comments: https://github.com/llvm/llvm-project/pull/136106 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

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

2025-04-20 Thread Nathan Ridge via cfe-commits
@@ -36,9 +36,12 @@ namespace { using ::testing::ElementsAre; using ::testing::IsEmpty; -std::vector hintsOfKind(ParsedAST &AST, InlayHintKind Kind) { +constexpr InlayHintOptions DefaultInlayHintOpts{}; HighCommander4 wrote: nit: let's call this `DefaultInlayH

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

2025-04-20 Thread Nathan Ridge via cfe-commits
@@ -147,6 +149,9 @@ std::string summarizeExpr(const Expr *E) { } // Literals are just printed +std::string VisitCXXNullPtrLiteralExpr(const CXXNullPtrLiteralExpr *E) { + return "nullptr"; HighCommander4 wrote: Could you add a small test case

[clang] [clang-tools-extra] [clangd] Support operators new and delete in textDocument/references (PR #135620)

2025-04-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/135620 ___ 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-20 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I was talking about a change like > [kadircet@ff0c31d](https://github.com/kadircet/llvm-project/commit/ff0c31d232b2aed9e95d69d16a9dfbb9babea711) Thanks for the more fleshed-out suggestion. As written, this would also have the following effects: 1. we no longer use `Sy

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

2025-04-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @tdupes @kadircet it looks like this PR was approved but has not been merged -- could we merge it? https://github.com/llvm/llvm-project/pull/71605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

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

2025-04-17 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/133681 >From bd514d4ab9a593f33ef36f9bc3fa888a17b633d7 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-16 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: The described options seem a bit more involved than necessary to fix this bug, given that it's just the value of the `StoreAllDocumentation` flag that's a problem. I revised the patch to add a new parameter to `createStaticIndexingAction()` (now called `createIndexingAct

[clang] [clang][AST] Handle implicit first argument in CallExpr::getBeginLoc() (PR #135757)

2025-04-16 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Yes, would be great to see it get backported Filed backport issue: https://github.com/llvm/llvm-project/issues/135922 https://github.com/llvm/llvm-project/pull/135757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang][AST] Handle implicit first argument in CallExpr::getBeginLoc() (PR #135757)

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

[clang] [clang][AST] Handle implicit first argument in CallExpr::getBeginLoc() (PR #135757)

2025-04-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/135757 >From a1569727c432ba67a96de07c899b562fcf349d1e Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 15 Apr 2025 03:40:37 -0400 Subject: [PATCH] [clang][AST] Handle implicit first argument in CallExpr::

[clang] [clang][AST] Handle implicit first argument in CallExpr::getBeginLoc() (PR #135757)

2025-04-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/135757 >From a1569727c432ba67a96de07c899b562fcf349d1e Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 15 Apr 2025 03:40:37 -0400 Subject: [PATCH] [clang][AST] Handle implicit first argument in CallExpr::

[clang] [clang][AST] Handle implicit first argument in CallExpr::getBeginLoc() (PR #135757)

2025-04-15 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Added changelog entry. Should we backport this to 20.x? https://github.com/llvm/llvm-project/pull/135757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Handle implicit first argument in CallExpr::getBeginLoc() (PR #135757)

2025-04-15 Thread Nathan Ridge via cfe-commits
@@ -1652,8 +1652,11 @@ SourceLocation CallExpr::getBeginLoc() const { if (!isTypeDependent()) { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); -Method && Method->isExplicitObjectMemberFunction()) - return getArg(0)->getBeginLoc();

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

2025-04-14 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Review ping 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 a build option to disable building dexp (PR #133124)

2025-04-13 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Ok, I went ahead and merged it. https://github.com/llvm/llvm-project/pull/133124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] clangd: Add a build option to disable building dexp (PR #133124)

2025-04-13 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/133124 ___ 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   >