[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -0,0 +1,26 @@ +template +void test() { + if constexpr (Flag) { +return; + } + // RUN: %clang_cc1 -fsyntax-only -std=c++17 -code-completion-at=%s:3:7 %s | FileCheck -check-prefix=CHECK-CXX17 %s + // RUN: %clang_cc1 -fsyntax-only -std=c++17 -code-completion-patterns -c

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope *S, Decl *D) { CodeCompleteExpression(S, Data); } +void SemaCodeCompletion::CodeCompleteIfConst(Scope *S, + bool AfterExclaim) const {

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

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

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -1553,6 +1553,13 @@ StmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) { IsConsteval = true; ConstevalLoc = ConsumeToken(); } + +if (Tok.is(tok::code_completion)) { HighCommander4 wrote: This needs to go in an `else` a

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-08 Thread Nathan Ridge via cfe-commits
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope *S, Decl *D) { CodeCompleteExpression(S, Data); } +void SemaCodeCompletion::CodeCompleteIfConst(Scope *S, + bool AfterExclaim) const { + ResultBuilder

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/130473 Fixes https://github.com/llvm/llvm-project/issues/130468 >From 0999f2fb15b6703fc9f5c4ba5c9e21c14a90b4ed Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 9 Mar 2025 01:36:25 -0500 Subject: [PATCH 1/

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

2025-03-04 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Recording myself as reviewer. I have a backlog of several patches in my review queue, will get to this as time permits.) https://github.com/llvm/llvm-project/pull/128503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang][AST] Remove HasFirstArg assertion in CallExpr::getBeginLoc() (PR #130725)

2025-03-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/130725 There are cases where the assertion legitimately does not hold (e.g. CallExpr::CreateTemporary()), and there's no readily available way to tell such cases apart. Fixes https://github.com/llvm/llvm-proje

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

2025-03-09 Thread Nathan Ridge via cfe-commits
@@ -151,6 +151,15 @@ struct Config { ArgumentListsPolicy ArgumentLists = ArgumentListsPolicy::FullPlaceholders; } Completion; + enum class HeaderInsertionPolicy { +IWYU, // Include what you use +NeverInsert // Never insert headers as part of code completio

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

2025-03-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for the patch! The general approach here looks good. One issue that I see with the current implementation is that it makes the command-line flag `--header-insertion=never` have no effect. That's because, while the

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

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

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/130473 >From 66e5ed1f1fcfe5a52d110ae228ddd51bd487ee16 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 9 Mar 2025 01:36:25 -0500 Subject: [PATCH 1/6] Change the parameter type of resolveTypeToTagDecl() to

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: I split the PR up into a few commits for easier reviewing. The high-level idea here is that the helper function `getAsRecordDecl()` in SemaCodeComplete.cpp is doing similar things to HeuristicResolver (specifically, `simplifyType` and `resolveTypeToRecordDecl`), but Heur

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

2025-03-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > To get the command line flag to interact with the config option better, we > > need to handle it in > > [`FlagsConfigProvider`](https://searchfox.org/llvm/rev/107aa6a3d3ab96b7eec55e1ec5c3eabfa6ab2f9f/clang-tools-extra/clangd/tool/ClangdMain.cpp#655), > > which gives t

[clang] [clang][AST] Remove HasFirstArg assertion in CallExpr::getBeginLoc() (PR #130725)

2025-03-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/130725 >From d6c4f884c221fffca5d686ed18a9f607450a8fb5 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 11 Mar 2025 02:34:51 -0400 Subject: [PATCH] [clang][AST] Remove HasFirstArg assertion in CallExpr::ge

[clang] [clang][AST] Remove HasFirstArg assertion in CallExpr::getBeginLoc() (PR #130725)

2025-03-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Missing changelog. Added. > Otherwise, I think it makes sense even if I sort of hate it, as it relies on > `TryCopyInitialization` looking at the location and nothing else. > > I wonder if we could get rid of `CallExpr::CreateTemporary` and instead > create something

[clang] [clang][AST] Remove HasFirstArg assertion in CallExpr::getBeginLoc() (PR #130725)

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

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

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

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-02-13 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: This is a bit more in the weeds of AST matchers internals than what I'm familiar with, so I've added some other reviewers who have reviewed more extensive changes to this code based on code history. https://github.com/llvm/llvm-project/pull/126793

[clang] [clang][Index] Use HeuristicResolver in IndexTypeSourceInfo as well (PR #128106)

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

[clang] [clang][Index] Use HeuristicResolver in IndexTypeSourceInfo as well (PR #128106)

2025-02-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/128106 None >From 10edf87574f5473da01bd985cec4c7810f57c516 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 20 Feb 2025 20:44:52 -0500 Subject: [PATCH] [clang][Index] Use HeuristicResolver in IndexTypeSou

[clang] [clang][Index] Use HeuristicResolver in IndexTypeSourceInfo as well (PR #128106)

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

[clang] [clang][Index] Use HeuristicResolver in IndexTypeSourceInfo as well (PR #128106)

2025-02-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/128106 >From 84fac9adf5ab366c85eac3a3abd4e52e0d3532d0 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 20 Feb 2025 20:44:52 -0500 Subject: [PATCH] [clang][Index] Use HeuristicResolver in IndexTypeSourceInf

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I take a look briefly about `HeuristicResolver`, it looks like not related to > other Sema parts. Is it possible to move the whole `HeuristicResolver` out of > `Sema` lib to `AST`? In future enhancements to `HeuristicResolver`, I would like to implement optional heuris

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Note: this is the last remaining use of > `CXXRecordDecl::lookupDependentName()`. I plan to remove it in a follow-up > patch. The follow-up patch is https://github.com/llvm/llvm-project/pull/128392. https://github.com/llvm/llvm-project/pull/128391 _

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/128391 The use replaces CXXRecordDecl::lookupDependentName() which HeuristicResolver aims to supersede. >From b44bc0bb4772ff503c8d93430331606d2f2356e3 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 22

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Note: this is the last remaining use of `CXXRecordDecl::lookupDependentName()`. I plan to remove it in a follow-up patch. https://github.com/llvm/llvm-project/pull/128391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang-tools-extra] [clang][NFC] Remove CXXRecordDecl::lookupDependentName() and its helpers (PR #128392)

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

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

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

[clang] [clang-tools-extra] [clang][NFC] Remove CXXRecordDecl::lookupDependentName() and its helpers (PR #128392)

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

[clang] [Sema] Add code completion for if constexpr and consteval (PR #124315)

2025-02-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: If I'm understanding correctly, this patch only completes the keywords themselves. SemaCodeComplete also has the ability to produce "snippets", for example [here](https://searchfox.org/llvm/rev/4e44bd027bf4e490380be770172994561616bd2d/clang/lib/Sema/SemaCodeComplete.cpp#2

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

2025-03-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/133681 Fixes https://github.com/clangd/clangd/issues/2344 >From 646963c0fdf3265e6149091786df7090d7b9dfb2 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 31 Mar 2025 02:25:45 -0400 Subject: [PATCH] [clang

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Rebased) https://github.com/llvm/llvm-project/pull/130473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/130473 >From ea2b2409894092ddc7b3fea5a6bee887e4d62235 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 9 Mar 2025 01:36:25 -0500 Subject: [PATCH 1/6] Change the parameter type of resolveTypeToTagDecl() to

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

2025-04-03 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @kraj, you approved this and you are a project member, are you comfortable merging this? If so, please go ahead. >From my point of view as a clangd maintainer, I'm supportive of having such an >option, but I have ~zero CMake knowledge, so if you think this needs more >re

[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-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 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] [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] [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 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-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
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] [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 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-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-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
@@ -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 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] 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
@@ -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] 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
@@ -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] [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
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] 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] 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] 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] 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] 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] [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] 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
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-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\"");

<    6   7   8   9   10   11