[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-06-02 Thread David Stone via cfe-commits
davidstone wrote: Is there any additional work needed on this before it can be merged? https://github.com/llvm/llvm-project/pull/93417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][Modules] Move `ASTSourceDescriptor` into its own file (PR #67930)

2024-06-02 Thread David Stone via cfe-commits
davidstone wrote: Could I get someone to merge this for me if there are no other changes required? https://github.com/llvm/llvm-project/pull/67930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] Remove dangling conversion to `optional &` (PR #93385)

2024-05-31 Thread David Stone via cfe-commits
davidstone wrote: Yes please https://github.com/llvm/llvm-project/pull/93385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-31 Thread David Stone via cfe-commits
@@ -159,7 +159,8 @@ class APINotesManager { ArrayRef getCurrentModuleReaders() const { bool HasPublic = CurrentModuleReaders[ReaderKind::Public]; bool HasPrivate = CurrentModuleReaders[ReaderKind::Private]; -assert((!HasPrivate || HasPublic) && "private module req

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-31 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/93417 >From 19b59231951b3ef48e36b0342f15d61687b72d8d Mon Sep 17 00:00:00 2001 From: David Stone Date: Fri, 31 May 2024 09:40:02 -0600 Subject: [PATCH] [clang][Modules] Remove unnecessary includes of `Module.h` ---

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread David Stone via cfe-commits
@@ -817,11 +817,11 @@ class alignas(8) Decl { "owned local decl but no local module storage"); return reinterpret_cast(this)[-1]; } - void setLocalOwningModule(Module *M) { + void setLocalOwningModule(const Module *M) { davidstone wrote: Hmm

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread David Stone via cfe-commits
davidstone wrote: > > Errr, not certain I agree with this -- that basically is "admit defeat and > > stop aiming for const correctness." > > Well, I am saying, add const to places we are pretty sure we will never > change, and leave const out when in doubt. Don't add const just because we > d

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread David Stone via cfe-commits
davidstone wrote: My philosophy on problems like that is that the first step to getting out of a hole is to stop digging the hole. We aren't going to make all of clang const-correct overnight, right? My goal here is starting with this one type: `Module`, and working on it. To me, this commit *

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread David Stone via cfe-commits
davidstone wrote: I'll admit, I'm surprised this PR has any push-back at all since this feels like just applying a very generally accepted principle. Things should be const by default -- you need a reason to declare something as not const, you should never need a reason to declare something as

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread David Stone via cfe-commits
davidstone wrote: Yes. Is there anything else you want to see in this PR before it can be merged? (I don't have merge permissions). This is the type of PR likely to get lots of conflicts if it stays open for long, so I'd like to get it wrapped up as fast as possible. https://github.com/llvm/l

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread David Stone via cfe-commits
davidstone wrote: > Can you make sure that at every place this PR touches `const` makes sense? I > found out recently that we can be quite good at pretending that something is > `const`, all the way down until we realize we need a `const_cast`, because > modification is required in that one pl

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread David Stone via cfe-commits
davidstone wrote: > Can you make sure that at every place this PR touches `const` makes sense? I > found out recently that we can be quite good at pretending that something is > `const`, all the way down until we realize we need a `const_cast`, because > modification is required in that one pl

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread David Stone via cfe-commits
@@ -42,7 +41,11 @@ #include #include -namespace clang::clangd { +namespace clang { + +class Module; davidstone wrote: Specifically I'm following the guidance at: https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible https://github.com/l

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread David Stone via cfe-commits
@@ -42,7 +41,11 @@ #include #include -namespace clang::clangd { +namespace clang { + +class Module; davidstone wrote: Is that a clangd preference or llvm-wide? I see a lot of forward declarations in other parts of the code so I want to understand when I sh

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread David Stone via cfe-commits
@@ -159,7 +159,8 @@ class APINotesManager { ArrayRef getCurrentModuleReaders() const { bool HasPublic = CurrentModuleReaders[ReaderKind::Public]; bool HasPrivate = CurrentModuleReaders[ReaderKind::Private]; -assert((!HasPrivate || HasPublic) && "private module req

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-26 Thread David Stone via cfe-commits
davidstone wrote: To give a little more detail about my plans as of right now: * Move `VisibleModuleSet` into its own file * Move `ASTFileSignature` into its own file * Take some of the related members of `Module`, group them together into their own class, and move the resulting classes into th

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-26 Thread David Stone via cfe-commits
davidstone wrote: > I don't like the PR since I don't feel it makes the code cleaner and it may > make the downstream suffering backporting. > > If there are deeper reasons or following patches, we can discuss them > seperately. On its own, I would agree. My goal is to split several more thin

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-26 Thread David Stone via cfe-commits
https://github.com/davidstone edited https://github.com/llvm/llvm-project/pull/93388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-26 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/93388 >From f4b9852b0c11a9b5087c5fdb7794b5cab7f4d22c Mon Sep 17 00:00:00 2001 From: David Stone Date: Sun, 26 May 2024 10:34:09 -0600 Subject: [PATCH 1/3] [clang][Modules] Remove unnecessary includes of `Module.h`

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-26 Thread David Stone via cfe-commits
https://github.com/davidstone created https://github.com/llvm/llvm-project/pull/93417 None >From f4b9852b0c11a9b5087c5fdb7794b5cab7f4d22c Mon Sep 17 00:00:00 2001 From: David Stone Date: Sun, 26 May 2024 10:34:09 -0600 Subject: [PATCH] [clang][Modules] Remove unnecessary includes of `Module.h`

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/93388 >From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 25 May 2024 14:13:30 -0600 Subject: [PATCH 1/5] [clang][Modules] Move `ASTSourceDescriptor` into its own fi

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/93388 >From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 25 May 2024 14:13:30 -0600 Subject: [PATCH 1/4] [clang][Modules] Move `ASTSourceDescriptor` into its own fi

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/93388 >From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 25 May 2024 14:13:30 -0600 Subject: [PATCH 1/3] [clang][Modules] Move `ASTSourceDescriptor` into its own fi

[clang] [clang-tools-extra] [libcxx] [lldb] [llvm] Add clang basic module directory (PR #93388)

2024-05-25 Thread David Stone via cfe-commits
https://github.com/davidstone created https://github.com/llvm/llvm-project/pull/93388 Depends on https://github.com/llvm/llvm-project/pull/67930 >From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 25 May 2024 14:13:30 -0600 Subject: [PATCH 1/2]

[clang] Remove dangling conversion to `optional &` (PR #93385)

2024-05-25 Thread David Stone via cfe-commits
https://github.com/davidstone created https://github.com/llvm/llvm-project/pull/93385 None >From 8c2ae501a09df7248117fa7d69cb0621aef14c1f Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 25 May 2024 14:32:56 -0600 Subject: [PATCH] Remove dangling conversion to `optional &` --- clang/inc

[clang] [lldb] [clang][Modules] Move `ASTSourceDescriptor` into its own file (PR #67930)

2024-05-25 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67930 >From 0933b8e0f3161c0037516f677f1de2e72811d921 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 25 May 2024 14:13:30 -0600 Subject: [PATCH] [clang][Modules] Move `ASTSourceDescriptor` into its own file -

[clang] [Sema] Add check for bitfield assignments to larger integral types (PR #68276)

2023-10-23 Thread David Stone via cfe-commits
davidstone wrote: The documentation for this should also explain how to write code such that the warning does not fire (by giving an example with `x & bitmask`) https://github.com/llvm/llvm-project/pull/68276 ___ cfe-commits mailing list cfe-commits@l

[clang] [C++20] [Modules] Don't emit function bodies which is noinline and av… (PR #68501)

2023-10-07 Thread David Stone via cfe-commits
davidstone wrote: This looks reasonable to me. I'll try to test this out by Monday evening or earlier to see what practical effect it has for some of my programs. https://github.com/llvm/llvm-project/pull/68501 ___ cfe-commits mailing list cfe-commits

[clang] [clang][Modules] `checkModuleIsAvailable` should use a const & parameter instead of pointer (PR #67902)

2023-10-04 Thread David Stone via cfe-commits
davidstone wrote: Would someone be able to merge this for me? I do not have permission. https://github.com/llvm/llvm-project/pull/67902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Make `Module::Requirement` a struct (PR #67900)

2023-10-04 Thread David Stone via cfe-commits
davidstone wrote: Would someone be able to merge this for me? I do not have permission. https://github.com/llvm/llvm-project/pull/67900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Move `ASTSourceDescriptor` into its own file (PR #67930)

2023-10-03 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67930 >From 3cb09af262cf53cecb73e2da342a7891bc9fe853 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sun, 1 Oct 2023 12:02:48 -0600 Subject: [PATCH] [clang][Modules] Move `ASTSourceDescriptor` into its own file --

[clang] [clang][Modules] `checkModuleIsAvailable` should use a const & parameter instead of pointer (PR #67902)

2023-10-03 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67902 >From 43d6a4e8e07ef3dba977e3e3c2adf05ac184ba85 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sun, 1 Oct 2023 00:41:34 -0600 Subject: [PATCH] [clang][Modules] `checkModuleIsAvailable` should use a const & p

[clang] [clang][Modules] Make `Module::Requirement` a struct (PR #67900)

2023-10-03 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67900 >From b5e64ac8d36fef66cb8ef698f74997616d2957bc Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 30 Sep 2023 22:57:34 -0600 Subject: [PATCH 1/2] [clang][Modules] Make `Module::Requirement` a struct `Modul

[clang] remove duplicate ModuleId alias (PR #67899)

2023-10-02 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67899 >From 07dd53a92efe420466b747dae821f892622e621f Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 30 Sep 2023 22:30:29 -0600 Subject: [PATCH] [clang] Remove duplicate `ModuleId` alias This alias is already

[clang] remove duplicate ModuleId alias (PR #67899)

2023-10-01 Thread David Stone via cfe-commits
davidstone wrote: @ChuanqiXu9 https://github.com/llvm/llvm-project/pull/67899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Make `Module::Requirement` a struct (PR #67900)

2023-10-01 Thread David Stone via cfe-commits
davidstone wrote: @ChuanqiXu9 https://github.com/llvm/llvm-project/pull/67900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] `checkModuleIsAvailable` should use a const & parameter instead of pointer (PR #67902)

2023-10-01 Thread David Stone via cfe-commits
davidstone wrote: @ChuanqiXu9 https://github.com/llvm/llvm-project/pull/67902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Move `ASTSourceDescriptor` into its own file (PR #67930)

2023-10-01 Thread David Stone via cfe-commits
https://github.com/davidstone created https://github.com/llvm/llvm-project/pull/67930 None >From a52da2e5889f14bcc36ae4263518a49e1e85c244 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sun, 1 Oct 2023 12:02:48 -0600 Subject: [PATCH] [clang][Modules] Move `ASTSourceDescriptor` into its own fi

[clang] remove duplicate ModuleId alias (PR #67899)

2023-10-01 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67899 >From 3583e0420b5de21a88f3e7d1289f3b272e680a98 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 30 Sep 2023 22:30:29 -0600 Subject: [PATCH] [clang] Remove duplicate `ModuleId` alias This alias is already

[clang] [clang][Modules] Make `Module::Requirement` a struct (PR #67900)

2023-10-01 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67900 >From 858a76e16a772078b29452645c5beb223c06dc8e Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 30 Sep 2023 22:57:34 -0600 Subject: [PATCH 1/2] [clang][Modules] Make `Module::Requirement` a struct `Modul

[clang] [clang][Modules] `checkModuleIsAvailable` should use a const & parameter instead of pointer (PR #67902)

2023-10-01 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67902 >From 63c7f357cedd2633feac36ec07892243661764d9 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sun, 1 Oct 2023 00:41:34 -0600 Subject: [PATCH] [clang][Modules] `checkModuleIsAvailable` should use a const & p

[clang] [clang][Modules] `checkModuleIsAvailable` should use a const & parameter instead of pointer (PR #67902)

2023-09-30 Thread David Stone via cfe-commits
https://github.com/davidstone created https://github.com/llvm/llvm-project/pull/67902 The `Module` parameter to `checkModuleIsAvailable` is currently passed by pointer to non-const. However, it requires only const access and it cannot be null. Change this to be a reference to const instead. T

[clang] [clang][Modules] Make `Module::Requirement` a struct (PR #67900)

2023-09-30 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67900 >From 0253be550776631980d77e7847c6337786d64911 Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 30 Sep 2023 22:57:34 -0600 Subject: [PATCH 1/2] [clang][Modules] Make `Module::Requirement` a struct `Modul

[clang] [clang][Modules] Make `Module::Requirement` a struct (PR #67900)

2023-09-30 Thread David Stone via cfe-commits
https://github.com/davidstone created https://github.com/llvm/llvm-project/pull/67900 `Module::Requirement` was defined as a `std::pair`. This required a comment to explain what the data members mean and makes the usage harder to understand. Replace this with a struct with two members, `Featu

[clang] remove duplicate ModuleId alias (PR #67899)

2023-09-30 Thread David Stone via cfe-commits
davidstone wrote: The description got a little messed up somehow, but should be fixed. https://github.com/llvm/llvm-project/pull/67899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] remove duplicate ModuleId alias (PR #67899)

2023-09-30 Thread David Stone via cfe-commits
https://github.com/davidstone updated https://github.com/llvm/llvm-project/pull/67899 >From 9bce0ece5bf8adaa094475305c44bcd06cd79e7f Mon Sep 17 00:00:00 2001 From: David Stone Date: Sat, 30 Sep 2023 22:30:29 -0600 Subject: [PATCH] [clang] Remove duplicate `ModuleId` alias This alias is already

[clang] remove duplicate ModuleId alias (PR #67899)

2023-09-30 Thread David Stone via cfe-commits
https://github.com/davidstone edited https://github.com/llvm/llvm-project/pull/67899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] remove duplicate ModuleId alias (PR #67899)

2023-09-30 Thread David Stone via cfe-commits
https://github.com/davidstone created https://github.com/llvm/llvm-project/pull/67899 - [ADT] Guard PagedVector death tests - [InstSimplify] Avoid use of ConstantExpr::getICmp. NFC (#67873) - [RISCV][MC] Recognise that fcvt.d.s with frm != 0b000 is valid (#67555) - [lipo] Support creating Univer