@@ -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
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
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
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
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
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
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
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
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
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
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
_
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
@@ -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(),
+
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
@@ -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
@@ -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
@@ -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
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope
*S, Decl *D) {
CodeCompleteExpression(S, Data);
}
+void SemaCodeCompletion::CodeCompleteIfConst(Scope *S,
+ bool AfterExclaim) const {
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
@@ -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
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope
*S, Decl *D) {
CodeCompleteExpression(S, Data);
}
+void SemaCodeCompletion::CodeCompleteIfConst(Scope *S,
+ bool AfterExclaim) const {
+ ResultBuilder
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/
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
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
@@ -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
@@ -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 (
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
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] [
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
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
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
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
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
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
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
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
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
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-
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
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
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
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
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
901 - 974 of 974 matches
Mail list logo