@@ -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
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/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 edited
https://github.com/llvm/llvm-project/pull/138846
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2455,6 +2455,11 @@ bool isIncludeFile(llvm::StringRef Line) {
}
bool allowImplicitCompletion(llvm::StringRef Content, unsigned Offset) {
+ // Check if we're inside an empty template argument list
HighCommander4 wrote:
nit: for consistency with the other
https://github.com/HighCommander4 requested changes to this pull request.
Looks reasonable to me, but the buildkite run is showing
`AllowImplicitCompletions.All` is currently failing
https://github.com/llvm/llvm-project/pull/138846
___
cfe-commits mai
https://github.com/HighCommander4 closed
https://github.com/llvm/llvm-project/pull/139489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 closed
https://github.com/llvm/llvm-project/pull/137613
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/137613
>From 7e715447d242d7e409e02059d2948fb3417fb00f Mon Sep 17 00:00:00 2001
From: Noustaa
Date: Mon, 28 Apr 2025 12:38:36 +0200
Subject: [PATCH 1/5] [clangd] Add CodePatterns config option under Completion
A
https://github.com/HighCommander4 approved this pull request.
Thanks, LGTM!
(I made one small tweak, to ConfigFragment.h, to refer to the config option
values `All` and `None` with correct capitalization.)
https://github.com/llvm/llvm-project/pull/137613
___
HighCommander4 wrote:
@Noustaa if you'd like to also submit a documentation patch for
https://clangd.llvm.org/config.html (source at
https://github.com/llvm/clangd-www/blob/main/config.md), that would be
appreciated!
https://github.com/llvm/llvm-project/pull/137613
___
HighCommander4 wrote:
(This came up during https://github.com/llvm/llvm-project/issues/139019 as a
potential diagnosis, but it does not fix the crash. As mentioned, no one was in
fact moving from the arguments, so passing them by rvalue reference and
forwarding them multiple times in the same
https://github.com/HighCommander4 created
https://github.com/llvm/llvm-project/pull/139489
The arguments passed are lightweight (an ArrayRef and a pointer), and
findSpecializationImpl passes them to multiple functions, making it a potential
hazard to pass them by rvalue reference (even though
https://github.com/HighCommander4 closed
https://github.com/llvm/llvm-project/pull/138640
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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
https://github.com/HighCommander4 requested changes to this pull request.
Thanks, the patch and tests look pretty good. I think we should leave out the
command-line arg, but otherwise should be good to go.
https://github.com/llvm/llvm-project/pull/137613
https://github.com/HighCommander4 edited
https://github.com/llvm/llvm-project/pull/137613
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -267,6 +267,17 @@ opt HeaderInsertion{
"Never insert #include directives as part of code completion")),
};
+opt CodePatterns{
HighCommander4 wrote:
We've been moving towards having configuration specified only in the config
file, not on the co
@@ -950,6 +951,11 @@ struct CompletionRecorder : public CodeCompleteConsumer {
// Retain the results we might want.
for (unsigned I = 0; I < NumResults; ++I) {
auto &Result = InResults[I];
+ if (Config::current().Completion.CodePatterns ==
+ Conf
HighCommander4 wrote:
> LGTM if HighCommander4 is happy.
Apologies, folks, I'm backlogged on reviews and probably won't have time to
look at this for a while. If you're looking for a clangd reviewer, perhaps one
of our other clangd maintainers, @llvm-beanz or @kadircet, could help with this
o
@@ -297,7 +301,8 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) {
Findings.UnusedIncludes.clear();
std::vector Diags = issueIncludeCleanerDiagnostics(
AST, TU.Code, Findings, MockFS(),
- {[](llvm::StringRef Header) { return Header.ends_with("buzz.h"); }});
+
@@ -142,6 +143,13 @@ std::vector generateMissingIncludeDiagnostics(
llvm::StringRef HeaderRef{Spelling};
bool Angled = HeaderRef.starts_with("<");
+for (auto Filter : AngledHeaders) {
HighCommander4 wrote:
nit: iterate using `auto &`, the way we d
@@ -262,6 +264,8 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) {
TU.Filename = "main.cpp";
TU.AdditionalFiles["a.h"] = guard("#include \"b.h\"");
TU.AdditionalFiles["b.h"] = guard("void b();");
+ TU.AdditionalFiles["a_angled.h"] = guard("#include \"b_angled.h\"");
@@ -306,6 +311,12 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) {
withFix({Fix(MainFile.range("insert_b"), "#include \"b.h\"\n",
"#include \"b.h\""),
FixMessage("add all missing includes")})),
+
https://github.com/HighCommander4 converted_to_draft
https://github.com/llvm/llvm-project/pull/140651
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/140651
>From 7f48d903c6d5f97a75208c799e0e96a26948af05 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sat, 17 May 2025 22:11:45 -0400
Subject: [PATCH 1/2] [clangd] Drop the optimization where only shards for
HighCommander4 wrote:
> I am afraid this doesn't address
> [clangd/clangd#1104](https://github.com/clangd/clangd/issues/1104) to a
> useful extent :/.
>
> Whenever a header `foo.h` changes, clangd will schedule indexing of only a
> **single** translation unit that depends on it, not all of th
HighCommander4 wrote:
> @HighCommander4 I'm just wondering, have you had a chance to check out this
> PR yet? If not, is there any chance you could find some time for it in the
> coming weeks or months?
My apologies, this has been languishing in my review queue and I haven't quite
managed to
HighCommander4 wrote:
> If you're looking for a clangd reviewer, perhaps one of our other clangd
> maintainers, @llvm-beanz or @kadircet, could help with this one.
(I realized you are probably not able to edit the Reviewers field, so I went
ahead and added the mentioned folks.)
https://github
HighCommander4 wrote:
> @kleinesfilmroellchen @HighCommander4 would it be possible to take a look
> when you have some time? Many thanks!
Yep, will do. Added myself as reviewer.
https://github.com/llvm/llvm-project/pull/140594
___
cfe-commits mailing
https://github.com/HighCommander4 created
https://github.com/llvm/llvm-project/pull/140651
The optimization is not valid, given that the target of a symbol reference can
change without the spelling of the reference (or anything else in the file
containing the reference) changing, as illustrate
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/140651
>From 7f48d903c6d5f97a75208c799e0e96a26948af05 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sat, 17 May 2025 22:11:45 -0400
Subject: [PATCH] [clangd] Drop the optimization where only shards for modif
https://github.com/HighCommander4 approved this pull request.
Thanks!
(Previously reviewed in https://github.com/llvm/llvm-project/pull/80180.)
https://github.com/llvm/llvm-project/pull/141208
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
https://github.com/HighCommander4 requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/140594
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
> > But since we have both config options, maybe there is a reason for
> > overwrites in this direction as well.
>
> Hmm, I was mainly focusing on the quoted -> angled case, hence why only the
> `AngledHeaders` filter is used. But I have to agree that following the config
@@ -262,6 +264,8 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) {
TU.Filename = "main.cpp";
TU.AdditionalFiles["a.h"] = guard("#include \"b.h\"");
TU.AdditionalFiles["b.h"] = guard("void b();");
+ TU.AdditionalFiles["a_angled.h"] = guard("#include \"b_angled.h\"");
1001 - 1068 of 1068 matches
Mail list logo