[clang] Add code completion for C++20 keywords. (PR #107982)

2024-10-10 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 1/7] add co_return, co_await, co_yield, consteval, constinit, concep

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-29 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > I am not sure which section I should add in clang/docs/ReleaseNotes.rst? > There isn't a section related to code completion. @16bit-ykiko There is an individual file for clang-tools-extras `clang-tools-extra/docs/ReleaseNotes.rst` which covers changes in clangd. See also http

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-26 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 1/7] add co_return, co_await, co_yield, consteval, constinit, concep

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-24 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 1/7] add co_return, co_await, co_yield, consteval, constinit, concep

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-23 Thread via cfe-commits
16bit-ykiko wrote: > What about `module`, `import` and `export`? Added, but I am not sure how to test them. Do I need a actual input module file or just use name started with `mod` like `modulexx` to test it. https://github.com/llvm/llvm-project/pull/107982

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-23 Thread via cfe-commits
16bit-ykiko wrote: > This change needs a release note. Please add an entry to > `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, > and referencing any Github issue this change fixes. Thanks! I an not sure which section I should add in `clang/docs/ReleaseNotes.rst`?

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-23 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 1/7] add co_return, co_await, co_yield, consteval, constinit, concep

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-23 Thread via cfe-commits
@@ -1837,6 +1837,10 @@ static void AddTypeSpecifierResults(const LangOptions &LangOpts, Builder.AddChunk(CodeCompletionString::CK_RightParen); Results.AddResult(Result(Builder.TakeString())); } + +if (LangOpts.CPlusPlus20) { 16bit-ykiko wro

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-17 Thread via cfe-commits
https://github.com/cor3ntin commented: This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, and referencing any Github issue this change fixes. Thanks! https://github.com/llvm/llvm-project/pull/107982

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-17 Thread via cfe-commits
@@ -1837,6 +1837,10 @@ static void AddTypeSpecifierResults(const LangOptions &LangOpts, Builder.AddChunk(CodeCompletionString::CK_RightParen); Results.AddResult(Result(Builder.TakeString())); } + +if (LangOpts.CPlusPlus20) { cor3ntin wrote:

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-17 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/107982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-12 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: What about `module`, `import` and `export`? https://github.com/llvm/llvm-project/pull/107982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
16bit-ykiko wrote: Also test with clangd, it work well. ![image](https://github.com/user-attachments/assets/e988b77b-25d9-4ec8-9d16-3123d5bcae83) ![image](https://github.com/user-attachments/assets/a738e0cf-311e-44fb-b75a-38be35e6277e) ![image](https://github.com/user-attachments/assets/feceeb96

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
@@ -0,0 +1,35 @@ +const char8_t x = 1; + +template requires true +const int y = requires { typename T::type; requires T::value; }; + +int f(){ co_await 1; } + +// RUN: %clang_cc1 -std=c++20 -code-completion-at=%s:1:3 %s | FileCheck --check-prefix=CHECK-TOP-LEVEL %s +// CHECK-TOP-

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 1/6] add co_return, co_await, co_yield, consteval, constinit, concep

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,35 @@ +const char8_t x = 1; + +template requires true +const int y = requires { typename T::type; requires T::value; }; + +int f(){ co_await 1; } + +// RUN: %clang_cc1 -std=c++20 -code-completion-at=%s:1:3 %s | FileCheck --check-prefix=CHECK-TOP-LEVEL %s +// CHECK-TOP-

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 1/5] add co_return, co_await, co_yield, consteval, constinit, concep

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 1/4] add co_return, co_await, co_yield, consteval, constinit, concep

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 1/3] add co_return, co_await, co_yield, consteval, constinit, concep

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 1c334debecd70bd28e61a36c40c3f96cf5467331 9a1a85c1c98a7e1826a3836028ddf7d37fdecd90 --e

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
https://github.com/16bit-ykiko edited https://github.com/llvm/llvm-project/pull/107982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: ykiko (16bit-ykiko) Changes This commit adds code completion for C++20 keywords. 1. complete `concept` in template context - [x] `template conce^` -> `concept` - [ ] `conce^` 2. complete `requires` - [x] constrain

[clang] Add code completion for C++20 keywords. (PR #107982)

2024-09-10 Thread via cfe-commits
https://github.com/16bit-ykiko created https://github.com/llvm/llvm-project/pull/107982 This commit adds code completion for C++20 keywords. 1. complete `concept` in template context - [x] `template conce^` -> `concept` - [ ] `conce^` 2. complete `requires` - [x] constraints in te