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

2025-02-16 Thread Nathan Ridge via cfe-commits
@@ -168,51 +169,33 @@ class BodyIndexer : public RecursiveASTVisitor { Parent, ParentDC, Roles, Relations, E); } - bool indexDependentReference( - const Expr *E, const Type *T, const DeclarationNameInfo &NameInfo, - llvm::funct

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

2025-02-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/125153 >From 55461723ee7849fe9247455f0bfd5cfd252596ea Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 30 Jan 2025 21:31:12 -0500 Subject: [PATCH] [clang][Index] Use HeuristicResolver in libIndex The uses

[clang] [clang-tools-extra] Revert "[clang] Compute accurate begin location for CallExpr with exp… (PR #126789)

2025-02-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: I posted a fix at https://github.com/llvm/llvm-project/pull/126868. https://github.com/llvm/llvm-project/pull/126789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

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

2025-03-19 Thread Nathan Ridge via cfe-commits
@@ -668,6 +668,7 @@ class FlagsConfigProvider : public config::Provider { std::optional IndexSpec; std::optional BGPolicy; std::optional ArgumentLists; +std::optional _HeaderInsertion; HighCommander4 wrote: nit: I haven't seen this convention (

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

2025-03-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! This looks good modulo a couple of remaining nits. https://github.com/llvm/llvm-project/pull/128503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][HeuristicResolver] Default argument heuristic for template parameters (PR #132465)

2025-03-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/132465 Fixes https://github.com/clangd/clangd/discussions/1056 >From 2855815b91dd924aa56e98ef00f228fdeac9d81d Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 13 Mar 2025 01:23:03 -0400 Subject: [PATCH] [

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

2025-03-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/130473 >From 909de4a22dcda164b8fcb539e0907a77f99b3b00 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-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Fixed now. Resubmitting for review. 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][HeuristicResolver] Default argument heuristic for template parameters (PR #132465)

2025-03-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/132465 ___ 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-21 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/7] Change the parameter type of resolveTypeToTagDecl() to

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

2025-03-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks, LGTM! 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-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed 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-tools-extra] [clangd] Add `HeaderInsertion` yaml config option (PR #128503)

2025-03-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed 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-tools-extra] [clangd] Add `HeaderInsertion` yaml config option (PR #128503)

2025-03-20 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][HeuristicResolver] Default argument heuristic for template parameters (PR #132465)

2025-04-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: This was previously submitted and approved at https://github.com/llvm/llvm-project/pull/131074, I just mistakenly merged that into a user branch. https://github.com/llvm/llvm-project/pull/132465 ___ cfe-commits mailing list cfe-

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

2025-04-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review 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-04-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (I messed things up a bit here by merging a PR that was stacked on top of this into this one. Marking as Draft until I sort that out.) https://github.com/llvm/llvm-project/pull/130473 ___ cfe-commits mailing list cfe-commits@list

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

2025-04-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: See diagnosis [here](https://github.com/clangd/clangd/issues/2344#issuecomment-2765249487): > The **actual** reason that `std::vector::size` is missing documentation when > the standard library AST is indexed is that, unlike during preamble indexing, > `Opts.StoreAllDocu

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

2025-03-26 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 converted_to_draft 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][CodeGen] Do not try to emit definition of variable whose initializer contains errors (PR #131278)

2025-03-13 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Note that doing so might also hide those similar bugs where we accidentally > make RecoveryExpr into CodeGen. So I don't know if this is on the right track Agreed. I wrote this patch for illustrative purposes but as I mentioned [here](https://github.com/llvm/llvm-projec

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

2025-03-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review 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-04-07 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Review ping :) 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-tools-extra] [llvm] [clangd][WIP] Add doxygen parsing using standalone doxygen parser (PR #128591)

2025-04-07 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @tcottin, thank you for taking the time to pick up this patch! It's clearly a popular feature request. @kadircet, you were involved with earlier rounds of review on the old patch (https://reviews.llvm.org/D143112) and design discussions in the issue (https://github.com/c

[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-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] 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-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] [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] 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] 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] 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
@@ -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
@@ -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-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
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] 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] 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-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-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] 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] 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] 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
@@ -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-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] [clang-tools-extra] [clang][HeuristicResolver] Apply default argument heuristic in resolveDeclRefExpr as well (PR #132576)

2025-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/132576 >From ac3780d5f747c8c063119a028a4735c725198003 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 22 Mar 2025 20:54:02 -0400 Subject: [PATCH] [clang][HeuristicResolver] Apply default argument heuristi

[clang] [clang-tools-extra] [clang][HeuristicResolver] Apply default argument heuristic in resolveDeclRefExpr as well (PR #132576)

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

[clang] [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (PR #134951)

2025-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/134951 ___ 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-04-10 Thread Nathan Ridge via cfe-commits
@@ -54,8 +54,9 @@ IdentifierInfo *Parser::getSEHExceptKeyword() { } Parser::Parser(Preprocessor &pp, Sema &actions, bool skipFunctionBodies) -: PP(pp), PreferredType(pp.isCodeCompletionEnabled()), Actions(actions), - Diags(PP.getDiagnostics()), StackHandler(Diags), +

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

2025-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/130473 >From f6c57947b12d8c22e8e54757fc03ff1e407aa12e 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-04-10 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-tools-extra] [clangd] Strip invalid fromRanges for outgoing calls (PR #134657)

2025-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/134657 >From 162b0535fc2ae745441404231e6b3bf3882b974e Mon Sep 17 00:00:00 2001 From: Hampus Adolfsson Date: Mon, 7 Apr 2025 14:51:03 +0200 Subject: [PATCH 1/2] [clangd] Strip invalid fromRanges for outgoing call

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

2025-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed 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-tools-extra] [clang][HeuristicResolver] Apply default argument heuristic in resolveDeclRefExpr as well (PR #132576)

2025-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/132576 ___ 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-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks for the patch! I made a small addition to the test to make it clearer why we have this conditional check. Please have a look at let me know if that makes sense to you. https://github.com/llvm/llvm-project/pull/134657

[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

[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] [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-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] [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
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] 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-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] 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 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] 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 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] [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] 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] 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] [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
@@ -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] [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
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-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] 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] 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] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)

2025-02-18 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/127757 … >From d7f83b154b17856b1de2d97cf0a3aca72dd0379c Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 19 Feb 2025 02:25:16 -0500 Subject: [PATCH] [clangd] Avoid round-trip from SourceLocation to clang

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > (For example `ClangdModules` was an action we were trying to take in this > direction. It actually aims to provide people infrastructure to implement > their desired functionality in clangd, while limiting resource and > maintenance costs to only that specific feature a

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I notice that there are four fields in the Symbol struct that are only > relevant for symbols indexed for completion. Presumably these would be > candidates for such an extension block? I think that depends on what proportion of symbols are indexed for completion. I wa

[clang-tools-extra] [clangd] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)

2025-02-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Noticed this while looking at https://github.com/llvm/llvm-project/issues/120175. The range information originates as a `CharSourceRange` in `MacroOccurrence::toRange()`, then it's converted to `clangd::Range` using `halfOpenToRange()`. Then we convert it back to a `Sour

[clang-tools-extra] [clangd] Enable parsing of forwarding functions in the preamble by default (PR #127359)

2025-02-17 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/127359 ___ 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 libIndex (PR #125153)

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

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-17 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Two quick thoughts, based on reading the discussion so far and a cursory glance at the patch: 1. Do we need to store a decl/def range in both `Symbol::Definition` and `Symbol::CanonicalDeclaration`? We could cut the memory usage overhead of the patch in half by only hav

[clang-tools-extra] [clangd] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)

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

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

2025-03-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/129459 >From 103a6843690182640d661e71517faf693c9e1c7d Mon Sep 17 00:00:00 2001 From: Khalil Estell Date: Sat, 1 Mar 2025 14:29:42 -0800 Subject: [PATCH 1/4] [clangd] Add `BuiltinHeaders` flag to Config file Usa

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

2025-03-07 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > we've had users for whom the BuiltinHeaders: QueryDriver behaviour worked > > better and want to switch back to it (examples here, here, here, here). > > I'd argue that the fix isn't as simple as using builtin headers from a > different toolchain for those users. Beca

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

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

[clang-tools-extra] [clangd] Add `BuiltinHeaders` flag to Config file (PR #129459)

2025-03-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/129459 ___ 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
@@ -6749,6 +6749,21 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope *S, Decl *D) { CodeCompleteExpression(S, Data); } +void SemaCodeCompletion::CodeCompleteIfConstExpr(Scope *S) const { + ResultBuilder Results(SemaRef, CodeCompleter->getAllocator(), +

[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 requested changes to this pull request. Thanks! I tried out the patch with clangd and it seems to be working pretty well. A further enhancement that occurs to me is that we could offer these patterns slightly earlier, e.g. when you're at the beginning of an em

[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, HighCommander4 wrote: The function does not use the `S` parameter, pleas

[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

<    5   6   7   8   9   10   11   >