[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: CI is green. Requesting review. https://github.com/llvm/llvm-project/pull/118236 ___ 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] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

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

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > relanded with benchmark fix in > [61fe67a](https://github.com/llvm/llvm-project/commit/61fe67a4017375fd675f75652e857e837f77fa51) > > changed required -> optional in > [c7ef0ac](https://github.com/llvm/llvm-project/commit/c7ef0ac9fd28cb55b8c7c91a890b365cc688f9a9) Thanks

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > @kadircet perhaps you might be able to pick up this review? > > Or, in the absence of a full review, your opinion on the directional > > question in [this comment](https://reviews.llvm.org/D93829#4654786) would > > be appreciated as well: > > > how would you feel about

[clang-tools-extra] [clangd] Augment code completion results with documentation from the index. (PR #120099)

2024-12-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks, this patch generally looks great. It would be nice to have a couple of test cases exercising the behaviour with overloaded methods when overload bundling is enabled (`CodeCompleteOptions::BundleOverloads` is set

[clang-tools-extra] [clangd] Augment code completion results with documentation from the index. (PR #120099)

2024-12-22 Thread Nathan Ridge via cfe-commits
@@ -1863,14 +1863,41 @@ class CodeCompleteFlow { CodeCompleteResult Output; // Convert the results to final form, assembling the expensive strings. +// If necessary, search the index for documentation comments. +LookupRequest Req; +llvm::DenseMap SymbolToCo

[clang-tools-extra] [clangd] Augment code completion results with documentation from the index. (PR #120099)

2024-12-22 Thread Nathan Ridge via cfe-commits
@@ -1101,6 +1101,42 @@ int x = foo^ Contains(AllOf(named("foo"), doc("This comment should be retained!"; } +TEST(CompletionTest, CommentsOnMembers) { HighCommander4 wrote: nit: call this `CommentsOnMembersFromHeader` https://github.com/llvm/llvm-pr

[clang-tools-extra] [clangd] Augment code completion results with documentation from the index. (PR #120099)

2024-12-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/120099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][ASTMatcher] Extend `hasDependentName` to match DependentNameType name (PR #121975)

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

[clang] [Clang][ASTMatcher] Extend `hasDependentName` to match DependentNameType name (PR #121975)

2025-01-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks, LGTM! https://github.com/llvm/llvm-project/pull/121975 ___ 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] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review https://github.com/llvm/llvm-project/pull/121314 ___ 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] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/121314 ___ 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] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Now that the dependent PR #121313 has merged, I've posted an RFC at https://discourse.llvm.org/t/rfc-upstream-heuristicresolver-from-clangd-to-libsema/84004, and I'm publishing this PR for review. https://github.com/llvm/llvm-project/pull/121314 __

[clang] [clang][AST] Assert that DependentNameType::Name is not null (PR #122418)

2025-01-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Context: I was confused by the comment above `DependentNameType::getIdentifier()`, which suggested the function only sometimes returns non-null, but I couldn't find any case where it would. It turns out the comment dates back to a time when the type stored a `PointerUnio

[clang] [clang][AST] Assert that DependentNameType::Name is not null (PR #122418)

2025-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/122418 Also clarify the comment above DependentNameType::getIdentifier() >From a1e3dcc6063cafa2f79aed88090dcc6f14be0ed7 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 9 Jan 2025 23:55:35 -0500 Subject:

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/121314 >From 4f0e828af34144412c42d8dda6e6a91c44f6b1fa Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 26 Dec 2024 00:40:48 -0500 Subject: [PATCH] [clang][Sema] Upstream HeuristicResolver from clangd Fixe

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Rebased. https://github.com/llvm/llvm-project/pull/121314 ___ 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] Respect const-qualification of methods in heuristic results (PR #123551)

2025-01-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/123551 >From cd87f05f19f245e24f5c29b97af0b69266608d7a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 20 Jan 2025 01:52:24 -0500 Subject: [PATCH 1/2] Upgrade HeuristicResolver to use QualType rather than

[clang] [clang-tools-extra] [clang][Sema] Respect const-qualification of methods in heuristic results (PR #123551)

2025-01-21 Thread Nathan Ridge via cfe-commits
@@ -422,7 +425,15 @@ std::vector HeuristicResolverImpl::resolveDependentMember( if (!RD->hasDefinition()) return {}; RD = RD->getDefinition(); -return lookupDependentName(RD, Name, Filter); +return lookupDependentName(RD, Name, [&](const NamedDecl *ND) {

[clang] [clang-tools-extra] [clang][Sema] Respect const-qualification of methods in heuristic results (PR #123551)

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

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve pointee types (PR #121315)

2025-01-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/121315 >From 25fdf43fb182212e859aba806ab32cc25ec466af Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 26 Dec 2024 20:59:06 -0500 Subject: [PATCH] [clang][CodeComplete] Use HeuristicResolver to resolve po

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve pointee types (PR #121315)

2025-01-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Rebased. Publishing for review. https://github.com/llvm/llvm-project/pull/121315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve pointee types (PR #121315)

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

[clang] [clang][Sema] Handle undeduced auto types in HeuristicResolver (PR #124236)

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

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve DependentNameTypes (PR #123818)

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

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve DependentNameTypes (PR #123818)

2025-01-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Thanks for the reviews! > Do we need a release note in llvm-project/clang/docs/ReleaseNotes.rst? This > is an improvement on clang's code completion infra, but maybe it is not > noticeable to compiler users. I added a generic note about using `HeuristicResolver` to impro

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve DependentNameTypes (PR #123818)

2025-01-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/123818 >From 1b909be45a871d4942869ca93dfedac406fb72f1 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 21 Jan 2025 15:56:27 -0500 Subject: [PATCH] [clang][CodeComplete] Use HeuristicResolver to resolve De

[clang] [clang][test] Add .cuh as a recognized extension for lit test files (PR #124080)

2025-01-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124080 Fixes https://github.com/llvm/llvm-project/issues/124079 >From dbdb0ed35cc33f7e4d6076812faaeef9437ddcc6 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 23 Jan 2025 01:34:14 -0500 Subject: [PATCH]

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve DependentNameTypes (PR #123818)

2025-01-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/123818 >From 25fdf43fb182212e859aba806ab32cc25ec466af Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 26 Dec 2024 20:59:06 -0500 Subject: [PATCH 1/3] [clang][CodeComplete] Use HeuristicResolver to resolve

[clang] [clang][test] Add .cuh as a recognized extension for lit test files (PR #124080)

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

[clang] [clang][Sema] Handle undeduced auto types in HeuristicResolver (PR #124236)

2025-01-23 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124236 Fixes https://github.com/clangd/clangd/issues/897 >From 94c375f40fa7e13c6c13c039893242f516072c6d Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 24 Jan 2025 01:56:48 -0500 Subject: [PATCH] [clang]

[clang] [clang][Sema] Handle undeduced auto types in HeuristicResolver (PR #124236)

2025-01-23 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Thanks, though having to nest five levels of 'if's seems a bit awkward I'll follow this up with a patch to implement the `FIXME`, it will almost certainly involve factoring out a new helper function so the nesting should be reduced. https://github.com/llvm/llvm-project

[clang] [clang][Sema] Handle undeduced auto types in HeuristicResolver (PR #124236)

2025-01-23 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/124236 >From 27d53f571de25bf102fe3b27a82edc9605911b50 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Fri, 24 Jan 2025 01:56:48 -0500 Subject: [PATCH] [clang][Sema] Handle undeduced auto types in HeuristicRes

[clang] [clang][Sema] Handle undeduced auto types in HeuristicResolver (PR #124236)

2025-01-23 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Fixed brace style) https://github.com/llvm/llvm-project/pull/124236 ___ 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] Respect const-qualification of methods in heuristic results (PR #123551)

2025-01-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/123551 Fixes https://github.com/llvm/llvm-project/issues/123549 >From cd87f05f19f245e24f5c29b97af0b69266608d7a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 20 Jan 2025 01:52:24 -0500 Subject: [PATCH 1

[clang] [clang-tools-extra] [clang][Sema] Respect const-qualification of methods in heuristic results (PR #123551)

2025-01-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: For ease of review, I split the PR into two patches (which I plan to squash): * The first patch is mechanical changes to use and propagate `QualType` rather than `Type *` in HeuristicResolver interfaces (both public and internal), where it makes sense. * The second patch

[clang] [clang-tools-extra] [clang][CodeComplete] Use HeuristicResolver to resolve pointee types (PR #121315)

2025-01-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/121315 >From 6cd526368a02fa2cf2e764eee295d356f73c3c1a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 20 Jan 2025 01:52:24 -0500 Subject: [PATCH 1/3] Upgrade HeuristicResolver to use QualType rather than

[clang] [clang-tools-extra] [clang][CodeComplete] Use HeuristicResolver to resolve pointee types (PR #121315)

2025-01-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Rebased on top of #123549. (I forgot to set up the stacking properly, so the commits from #123549 show up here too. They will go away after #123549 merges and I rebase again.) Confirmed locally that `Clang.Index/complete-memfunc-cvquals.cpp` is now passing. https://gith

[clang] [clang-tools-extra] [clang][CodeComplete] Use HeuristicResolver to resolve pointee types (PR #121315)

2025-01-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > This made me realize that `HeuristicResolver::getPointeeType()` actually has > a deficiency where it incorrectly discards the cv-qualifiers of the returned > pointee type. I'll fix that in a dependent patch before proceeding with this. Filed https://github.com/llvm/llvm

[clang] [clang-tools-extra] [clang][CodeComplete] Use HeuristicResolver to resolve pointee types (PR #121315)

2025-01-17 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/121315 ___ 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] Upstream HeuristicResolver from clangd (PR #121314)

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

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2025-01-20 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Does anyone know the estimated release date for version 20? Based on https://llvm.org/docs/HowToReleaseLLVM.html#annual-release-schedule, approximately March 6. https://github.com/llvm/llvm-project/pull/117673 ___ cfe-commits

[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)

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

[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)

2025-01-26 Thread Nathan Ridge via cfe-commits
@@ -133,8 +133,8 @@ TemplateName getReferencedTemplateName(const Type *T) { CXXRecordDecl *HeuristicResolverImpl::resolveTypeToRecordDecl(const Type *T) { assert(T); - // Unwrap type sugar such as type aliases. - T = T->getCanonicalTypeInternal().getTypePtr(); + // Unwrap

[clang] [clang][Sema] Handle dependent qualifier in HeuristicResolver::resolveDeclRefExpr() (PR #124515)

2025-01-26 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124515 None >From fa75210dc704848727f0822e84d1c3e6c8f0738f Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 27 Jan 2025 02:14:13 -0500 Subject: [PATCH] [clang][Sema] Handle dependent qualifier in Heurist

[clang] [clang][Sema] Handle dependent qualifier in HeuristicResolver::resolveDeclRefExpr() (PR #124515)

2025-01-26 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (This is something I noticed while working on the improvements discussed [here](https://github.com/llvm/llvm-project/pull/124451#discussion_r1929954747). Sending out separately to keep things easy to review.) https://github.com/llvm/llvm-project/pull/124515 __

[clang] [clang][Sema] Handle dependent qualifier in HeuristicResolver::resolveDeclRefExpr() (PR #124515)

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

[clang] [clang][Sema] Null-check type in resolveMemberExpr() before checking for auto type (PR #124628)

2025-01-27 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: No test case because there wasn't one in the bug report; I diagnosed the issue based on the stack trace only. https://github.com/llvm/llvm-project/pull/124628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang][Sema] Null-check type in resolveMemberExpr() before checking for auto type (PR #124628)

2025-01-27 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124628 Fixes https://github.com/clangd/clangd/issues/2301 >From 5ecde7be72659f66c45b4cfdc9e398bdb850e862 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 27 Jan 2025 16:07:34 -0500 Subject: [PATCH] [clang

[clang] [clang][Sema] Null-check type in resolveMemberExpr() before checking for auto type (PR #124628)

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

[clang] [clang][Sema] Generalize HeuristicResolver::resolveTypeToRecordDecl() to resolveTypeToTagDecl() (PR #124699)

2025-01-27 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/124699 >From 24eab93061adf9a241a0b0b418ea0750e2b66b9d Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 27 Jan 2025 01:22:31 -0500 Subject: [PATCH] [clang][Sema] Generalize HeuristicResolver::resolveTypeTo

[clang] [clang][Sema] Generalize HeuristicResolver::resolveTypeToRecordDecl() to resolveTypeToTagDecl() (PR #124699)

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

[clang] [clang][Sema] Handle pointer and reference type more robustly in HeuristicResolver::resolveMemberExpr() (PR #124451)

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

[clang] [clang][Sema] Handle pointer and reference type more robustly in HeuristicResolver::resolveMemberExpr() (PR #124451)

2025-01-28 Thread Nathan Ridge via cfe-commits
@@ -133,8 +133,8 @@ TemplateName getReferencedTemplateName(const Type *T) { CXXRecordDecl *HeuristicResolverImpl::resolveTypeToRecordDecl(const Type *T) { assert(T); - // Unwrap type sugar such as type aliases. - T = T->getCanonicalTypeInternal().getTypePtr(); + // Unwrap

[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)

2025-01-28 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/124451 >From 4ab3d58993f93de2e913f6805518edbf29e11ab3 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 26 Jan 2025 02:04:45 -0500 Subject: [PATCH] [clang][Sema] Handle pointer and reference type more robus

[clang] [clang][Sema] Handle pointer and reference type more robustly in HeuristicResolver::resolveMemberExpr() (PR #124451)

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

[clang] [clang][Sema] Handle pointer and reference type more robustly in HeuristicResolver::resolveMemberExpr() (PR #124451)

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

[clang] [clang-tools-extra] [ASTMatchers][NFC] use `Matcher` instead of `DynTypedMatcher` in `TypeLocTypeMatcher` (PR #123450)

2025-01-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: I don't really have enough experience with the AST matcher implementations to provide an authoritative review of this, sorry. I did do some digging in the code history, and found that `TypeLocTypeMatcher` did store a `Matcher` in the past. That was changed in https://git

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve DependentNameTypes (PR #123818)

2025-01-21 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/123818 >From 25fdf43fb182212e859aba806ab32cc25ec466af Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 26 Dec 2024 20:59:06 -0500 Subject: [PATCH 1/3] [clang][CodeComplete] Use HeuristicResolver to resolve

[clang] [clang][Sema] Handle pointer and reference type more robustly in HeuristicResolver::resolveMemberExpr() (PR #124451)

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

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve CXXDependentScopeMemberExpr (PR #124888)

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

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve CXXDependentScopeMemberExpr (PR #124888)

2025-01-29 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/124888 >From a28c3b66cfe3d12b05c45fdf9dc40ee961439c2e Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 26 Jan 2025 01:30:28 -0500 Subject: [PATCH] [clang][CodeComplete] Use HeuristicResolver to resolve CX

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve CXXDependentScopeMemberExpr (PR #124888)

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

[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)

2025-01-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124451 Partially fixes https://github.com/llvm/llvm-project/issues/124450 >From 9c8349f994f8c66f07be79834352fbe25301ef43 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 26 Jan 2025 02:04:45 -0500 Subject

[clang] [clang][CodeComplete] Use HeuristicResolver to resolve CXXDependentScopeMemberExpr (PR #124449)

2025-01-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/124449 None >From 6f0ff1b166f2ea3b0bfa58ca2a0911832d751bdf Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 26 Jan 2025 01:30:28 -0500 Subject: [PATCH] [clang][CodeComplete] Use HeuristicResolver to resol

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-04 Thread Nathan Ridge via cfe-commits
@@ -3449,6 +3449,19 @@ Narrowing Matchers +MatcherDependentScopeDeclRefExpr>hasDependentNamestd::string N +Matches the dependent name of a dependent scope decl ref expr. HighCom

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-04 Thread Nathan Ridge via cfe-commits
@@ -1116,6 +1116,8 @@ AST Matchers - Add ``dependentTemplateSpecializationType`` matcher to match a dependent template specialization type. +- Add ``hasDependentName`` matcher to match the dependent name of a dependent scope decl ref expr. HighCommander4 wr

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-04 Thread Nathan Ridge via cfe-commits
@@ -2235,6 +2235,21 @@ TEST_P(ASTMatchersTest, ArgumentCountIs_CXXConstructExpr) { Constructor1Arg)); } +TEST_P(ASTMatchersTest, hasDependentName_DependentScopeDeclRefExpr) { HighCommander4 wrote: nit: looking at other tests in this file, th

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-04 Thread Nathan Ridge via cfe-commits
@@ -3257,6 +3257,17 @@ AST_MATCHER_P(CXXDependentScopeMemberExpr, memberHasSameNameAsBoundNode, }); } +/// Matches the dependent name of a dependent scope decl ref expr HighCommander4 wrote: likewise here, "of a DependentScopeDeclRefExpr" https://gith

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-04 Thread Nathan Ridge via cfe-commits
@@ -2235,6 +2235,21 @@ TEST_P(ASTMatchersTest, ArgumentCountIs_CXXConstructExpr) { Constructor1Arg)); } +TEST_P(ASTMatchersTest, hasDependentName_DependentScopeDeclRefExpr) { + if (!GetParam().isCXX() || GetParam().hasDelayedTemplateParsing()) { +// FIXM

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

2025-01-04 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for implementing this! The patch looks pretty good, I just have some minor comments and a suggestion for a new test case. https://github.com/llvm/llvm-project/pull/121656 __

[clang] [Clang][ASTMatcher] Add a matcher for the name of a DependentScopeDeclRefExpr (PR #121656)

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

[clang-tools-extra] [clangd] Augment code completion results with documentation from the index. (PR #120099)

2024-12-21 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I've come across an issue with this, again. This seems to work for headers > I've written myself (or at least ones in my own project), but for e.g. > standard library include types, it doesn't work. Something like > > ``` > std::string a; > a.^ > ``` > > still cont

[clang] [Clang][ASTMatcher] Add `dependentScopeDeclRefExpr` Matcher (PR #120996)

2024-12-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks, LGTM! I will wait a few days before merging in case anyone else has feedback. https://github.com/llvm/llvm-project/pull/120996 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang-tools-extra] [clangd] Augment code completion results with documentation from the index. (PR #120099)

2025-01-14 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks for the update! This looks good, I'll go ahead and merge it. https://github.com/llvm/llvm-project/pull/120099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang-tools-extra] [clangd] Augment code completion results with documentation from the index. (PR #120099)

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

[clang-tools-extra] [clangd] Augment code completion results with documentation from the index. (PR #120099)

2025-01-14 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Seems to be template-related. > > test.hpp: > > ```c++ > template > struct templated { > // comment > void foo(); > }; > struct nontemplated { > // comment > void foo(); > }; > ``` > > test.cpp: > > ```c++ > #include "main.hpp" > void foo() { > nontemplated

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-16 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Adding some reviewers. The RFC has been published for a week, and the responses have been favourable with no objections. https://github.com/llvm/llvm-project/pull/121314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-07 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/121314 ___ 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 unit test suite for HeuristicResolver (PR #121313)

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

[clang] [clang][AST] Assert that DependentNameType's Name and NNS are not null (PR #122418)

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

[clang-tools-extra] [clangd] Implement simple folding of preprocessor branches (rebased) (PR #121449)

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

[clang-tools-extra] [clangd] Implement simple folding of preprocessor branches (rebased) (PR #121449)

2025-01-16 Thread Nathan Ridge via cfe-commits
@@ -124,6 +124,9 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &, /// The choices are stored in Conditional::Taken nodes. void chooseConditionalBranches(DirectiveTree &, const TokenStream &Code); +std::vector pairDirectiveRanges(const DirectiveTree &Tree,

[clang-tools-extra] [clangd] Implement simple folding of preprocessor branches (rebased) (PR #121449)

2025-01-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. This is my first time looking at this code (SemanticSelection.cpp / DirectiveTree.cpp) so I'm not sure if I'm the best reviewer, but on a high level what this patch is doing seems reasonable to me. Some unit tests for th

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

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126868 >From 94300606f574b39a13d580aaf38b214293dfd502 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 12 Feb 2025 02:37:49 -0500 Subject: [PATCH] [clang][AST] Handle dependent representation of call to f

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

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited 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][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
@@ -1648,8 +1648,11 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); Method && Method->isExplicitObjectMemberFunction()) { -assert(getNumArgs() > 0 && getArg(0)); -return getArg(0)->getBeg

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

2025-02-12 Thread Nathan Ridge via cfe-commits
@@ -1648,8 +1648,11 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); Method && Method->isExplicitObjectMemberFunction()) { -assert(getNumArgs() > 0 && getArg(0)); -return getArg(0)->getBeg

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

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126868 >From dc03bb6854545dabb9023d6c66e7593d692f8a82 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 12 Feb 2025 02:37:49 -0500 Subject: [PATCH] [clang][AST] Handle dependent representation of call to f

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

2025-02-12 Thread Nathan Ridge via cfe-commits
@@ -1645,11 +1645,21 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *OCE = dyn_cast(this)) return OCE->getBeginLoc(); + // A non-dependent call to a member function with an explicit object parameter + // is modelled with the object expression being t

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

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited 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][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > While this may not be the most optimal solution, we can likely go with it > as-is to put the fire out. Given [this comment](https://github.com/llvm/llvm-project/pull/126868#discussion_r1953948099) (i.e. that the behaviour with this patch is correct for the dependent ca

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

2025-02-12 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Can we please add more details in the summary about e.g. "This fixes a crash > when ... and the fix is ..." Done. https://github.com/llvm/llvm-project/pull/126868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

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

2025-02-13 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Sorry I haven't had a chance to look at this so far; I haven't quite gotten to a place where I'm keeping up with review requests. I will try to make time for it over the coming weeks, but I've also added our other clangd maintainers as reviewers, in case they have some ti

[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 656a47976d1b8699d5f6e0b0b9421866804c8eb2 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][Index] Use HeuristicResolver in libIndex (PR #125153)

2025-02-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited 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] [clang][Index] Use HeuristicResolver in libIndex (PR #125153)

2025-02-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review 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] Enable parsing of forwarding functions in the preamble by default (PR #127359)

2025-02-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/127359 >From fd189ad1b09c59040c3c2c16a7eccc0ce22c5b53 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 15 Feb 2025 01:57:10 -0500 Subject: [PATCH] [clangd] Enable parsing of forwarding functions in the pr

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

2025-02-16 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Maybe for consistency we should also change the other defaults that IIRC are > used to configure tests: > > https://github.com/llvm/llvm-project/blob/dbc98cfa46d52ede06e8be7fc5e855d807ba0fac/clang-tools-extra/clangd/ClangdServer.h#L187 > > https://github.com/llvm/llvm-p

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

2025-02-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/127359 Fixes https://github.com/clangd/clangd/issues/2324 >From 0ff06807c2c8255f472fc45e9a8922201384bf08 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 15 Feb 2025 01:57:10 -0500 Subject: [PATCH] [clang

<    4   5   6   7   8   9   10   11   >