[clang] [clang-repl] Keep the first llvm::Module empty to avoid invalid memory access. (PR #89031)

2024-04-19 Thread Lang Hames via cfe-commits
https://github.com/lhames approved this pull request. If there's a trivial reproducer for the original issue it may be worth adding it as a regression test. https://github.com/llvm/llvm-project/pull/89031 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang][dataflow] Expose getReferencedDecls for a Stmt. (PR #89444)

2024-04-19 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi created https://github.com/llvm/llvm-project/pull/89444 None >From e7b1540984306bfb36a59fa7692208bfaf2bdc1a Mon Sep 17 00:00:00 2001 From: Samira Bazuzi Date: Fri, 19 Apr 2024 15:09:32 -0400 Subject: [PATCH] [clang][dataflow] Expose getReferencedDecls for a Stmt. ---

[clang] [clang][dataflow] Expose getReferencedDecls for a Stmt. (PR #89444)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Samira Bazuzi (bazuzi) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/89444.diff 2 Files Affected: - (modified) clang/include/clang/Analysis/FlowSensitive/ASTOps.h (+3) - (modified) clang/lib/Analysis/FlowSensitive/A

[clang] [clang][modules] Allow module map files with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Keep the first llvm::Module empty to avoid invalid memory access. (PR #89031)

2024-04-19 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > If there's a trivial reproducer for the original issue it may be worth adding > it as a regression test. It is manifested in https://github.com/llvm/llvm-project/pull/84758 which has a test. That PR will unblock the other one which will make the test more explicit by chang

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-19 Thread Bill Wendling via cfe-commits
@@ -0,0 +1,40 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -Wno-missing-declarations -emit-llvm -o - %s | FileCheck %s + +struct foo { + int x,y,z; + struct bar

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/89126 >From 36ddb5811f11a1f6968705005713f34713026dbb Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 17 Apr 2024 12:23:02 -0700 Subject: [PATCH 1/8] [Clang] Handle structs with inner structs and no fields A

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-19 Thread Bill Wendling via cfe-commits
@@ -0,0 +1,22 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -Wno-missing-declarations -emit-llvm -o - %s | FileCheck %s + +struct foo { + struct bar { +int cou

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/89126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][clang] Don't enable -mrelax-all for -O0 on RISC-V (PR #88538)

2024-04-19 Thread Craig Topper via cfe-commits
@@ -1,4 +1,4 @@ -// XFAIL: target={{.*}}-aix{{.*}} +// XFAIL: target={{.*}}-aix{{.*}}, target=riscv{{.*}} topperc wrote: What triple should i use for the -mrelax-all test? https://github.com/llvm/llvm-project/pull/88538 __

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-19 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM Please don't forget to fix CountCountedByAttrs... but it's fine if it's in a followup. https://github.com/llvm/llvm-project/pull/89126 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [clang][dataflow] Expose getReferencedDecls for a Stmt. (PR #89444)

2024-04-19 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/89444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3ea5dff - [clang][modules] Only avoid pruning module maps when asked to (#89428)

2024-04-19 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-04-19T12:45:40-07:00 New Revision: 3ea5dff0efdbb4bf5590d882810aa42f9ec26e4e URL: https://github.com/llvm/llvm-project/commit/3ea5dff0efdbb4bf5590d882810aa42f9ec26e4e DIFF: https://github.com/llvm/llvm-project/commit/3ea5dff0efdbb4bf5590d882810aa42f9ec26e4e.diff L

[clang] [clang][modules] Only avoid pruning module maps when asked to (PR #89428)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/89428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/89126 >From 36ddb5811f11a1f6968705005713f34713026dbb Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 17 Apr 2024 12:23:02 -0700 Subject: [PATCH 1/8] [Clang] Handle structs with inner structs and no fields A

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89441 >From 9165d6086e2570198fba1c333d0c9cb9c09037c7 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 12:13:06 -0700 Subject: [PATCH] [clang][modules] Allow module map files with textual header b

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c32712d - [Clang] Handle structs with inner structs and no fields (#89126)

2024-04-19 Thread via cfe-commits
Author: Bill Wendling Date: 2024-04-19T19:48:33Z New Revision: c32712d1763d74329b42c1cd68a24d4c0075b596 URL: https://github.com/llvm/llvm-project/commit/c32712d1763d74329b42c1cd68a24d4c0075b596 DIFF: https://github.com/llvm/llvm-project/commit/c32712d1763d74329b42c1cd68a24d4c0075b596.diff LOG:

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/89126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Expose getReferencedDecls for a Stmt. (PR #89444)

2024-04-19 Thread Samira Bazuzi via cfe-commits
bazuzi wrote: Ha, so fast I hadn't even hit send to ask for you to review yet. Can you merge for me? https://github.com/llvm/llvm-project/pull/89444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang-tools-extra] [lldb] [llvm] Apply modernize-use-starts-ends-with on llvm-project (PR #89140)

2024-04-19 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89140 >From 2c82316a0f6641b93c666143211a87f06de8feab Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Wed, 17 Apr 2024 14:27:42 -0400 Subject: [PATCH] Apply modernize-use-starts-ends-with on llvm-project ---

[clang-tools-extra] [lldb] [llvm] Apply modernize-use-starts-ends-with on llvm-project (PR #89140)

2024-04-19 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Added one missed instance due to CMake configuration options. https://github.com/llvm/llvm-project/pull/89140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes These macros are used by STL implementations to support implementation of std::hardware_destructive_interference_size and std::hardware_constructive_interference_size Fixes #60174 --- Full diff: http

[clang] [RISCV][clang] Don't enable -mrelax-all for -O0 on RISC-V (PR #88538)

2024-04-19 Thread Fangrui Song via cfe-commits
@@ -1,4 +1,4 @@ -// XFAIL: target={{.*}}-aix{{.*}} +// XFAIL: target={{.*}}-aix{{.*}}, target=riscv{{.*}} MaskRay wrote: Perhaps the commonplace `--target=x86_64` https://github.com/llvm/llvm-project/pull/88538 ___ cfe

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: During today's office hours, @philnik777 mentioned that support for these macros would be very beneficial to libc++ folks. This is intended as a starting point for the support in that it does not currently have any special logic for any particular target and it does not hav

[clang] c8e65e1 - [clang] CTAD: Fix require-clause is not transformed. (#89378)

2024-04-19 Thread via cfe-commits
Author: Haojian Wu Date: 2024-04-19T22:07:11+02:00 New Revision: c8e65e193d542464421ad4f9a9965d45b302ac0c URL: https://github.com/llvm/llvm-project/commit/c8e65e193d542464421ad4f9a9965d45b302ac0c DIFF: https://github.com/llvm/llvm-project/commit/c8e65e193d542464421ad4f9a9965d45b302ac0c.diff LO

[clang] [clang] CTAD: Fix require-clause is not transformed. (PR #89378)

2024-04-19 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/89378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Hmm, this will probably only work if you compile `A` into a PCM and then pass it to `B`. This is not how "Modules/preprocess-decluse.cpp" is set up. https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-c

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Swap out range metadata to range attribute for cttz/ctlz/ctpop (PR #88776)

2024-04-19 Thread Andreas Jonson via cfe-commits
andjo403 wrote: This time it seems like I have managed to get all the tests to pass at least on linux, windows have not executed yet. https://github.com/llvm/llvm-project/pull/88776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [clang] Allow relational comparisons between unequal pointers to `void` in constant expressions (PR #89449)

2024-04-19 Thread via cfe-commits
https://github.com/offsetof created https://github.com/llvm/llvm-project/pull/89449 This patch disables the relevant diagnostic in C++17 and later modes. Fixes #45653 >From 44e3c7a4ced2ef1f8b78ab8b0009314fbcd05c6f Mon Sep 17 00:00:00 2001 From: offsetof <131769984+offse...@users.noreply.github

[clang] [clang] Allow relational comparisons between unequal pointers to `void` in constant expressions (PR #89449)

2024-04-19 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang] Allow relational comparisons between unequal pointers to `void` in constant expressions (PR #89449)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (offsetof) Changes This patch disables the relevant diagnostic in C++17 and later modes. Fixes #45653 --- Full diff: https://github.com/llvm/llvm-project/pull/89449.diff 7 Files Affected: - (modified) clang/lib/AST/ExprConstant.cp

[clang] d634b23 - [clang][dataflow] Expose getReferencedDecls for a Stmt. (#89444)

2024-04-19 Thread via cfe-commits
Author: Samira Bazuzi Date: 2024-04-19T16:23:43-04:00 New Revision: d634b233640dc38cf5f673a9cfcd1fe55124430a URL: https://github.com/llvm/llvm-project/commit/d634b233640dc38cf5f673a9cfcd1fe55124430a DIFF: https://github.com/llvm/llvm-project/commit/d634b233640dc38cf5f673a9cfcd1fe55124430a.diff

[clang] [clang][dataflow] Expose getReferencedDecls for a Stmt. (PR #89444)

2024-04-19 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand closed https://github.com/llvm/llvm-project/pull/89444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: I can confirm applying this allows our targets to build again! :tada: Thank you, will take a look at the implementation now. https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: #89441 fixes our build problems, with or without this patch applied. It's possible this patch makes things better - I haven't checked for actual sloc usage yet, just whether the build fails. So I'll focus on understanding that one and then return here. (I think I'm close to

[clang-tools-extra] [lldb] [llvm] Apply modernize-use-starts-ends-with on llvm-project (PR #89140)

2024-04-19 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere approved this pull request. LLDB & VFS change LGTM. https://github.com/llvm/llvm-project/pull/89140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][clang] Don't enable -mrelax-all for -O0 on RISC-V (PR #88538)

2024-04-19 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/88538 >From a27600bd46a784dbf028dba4153858700d7843af Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 12 Apr 2024 09:57:06 -0700 Subject: [PATCH 1/2] [RISCV][clang] Don't enable -mrelax-all for -O0 on RISC-V -O0

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-19 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Just so you're aware, it's possible that https://github.com/llvm/llvm-project/pull/87848 introduced some unexpected behavior change. It would be good to check if your issues are caused just by one patch in isolation or by a combination of more patches that landed recently.

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: > Hmm, this will probably only work if you compile `A` into a PCM and then pass > it to `B`. This is not how "Modules/preprocess-decluse.cpp" is set up. In our case we always have a chain A <- B <- C. A.modulemap can be affecting for B but should not be for C. (Approximately,

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. This makes sense to me. It corresponds to our build structure and fixes the new build failures we saw after 0cd0aa029647c8d1dba5c3d62f92325576796fa2. Really appreciate your work on this! https://github.com/llvm/llvm-project/pull/89441 _

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #89453)

2024-04-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/89453 Only FieldDecls are of importance here. A struct defined within another struct has the same semantics as if it were defined outside of the struct. So there's no need to look into RecordDecls that aren't a fiel

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #89453)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bill Wendling (bwendling) Changes Only FieldDecls are of importance here. A struct defined within another struct has the same semantics as if it were defined outside of the struct. So there's no need to look into RecordDecls that aren't a

[clang-tools-extra] [lldb] [llvm] Apply modernize-use-starts-ends-with on llvm-project (PR #89140)

2024-04-19 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Maybe @kazutakahirata (or anyone else) can stamp the minor `clang-doc` change? I don't have commit access, feel free to hit merge when everything is in order 👍 . https://github.com/llvm/llvm-project/pull/89140 ___ cfe-commits mailing

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-19 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,25 @@ +// Check that a clang invocation can spawn and handshake with a module build daemon + +// RUN: %kill-process "-cc1modbuildd mbd-handshake" +// RUN: rm -rf mbd-handshake %t +// RUN: split-file %s %t + +//--- main.c +int main() {return 0;} + +// RUN: %clang -fmodu

[clang] Improve documented sampling profiler steps to best known methods (PR #88438)

2024-04-19 Thread Tim Creech via cfe-commits
@@ -2443,27 +2443,29 @@ usual build cycle when using sample profilers for optimization: usual build flags that you always build your application with. The only requirement is that DWARF debug info including source line information is generated. This DWARF information

[clang-tools-extra] [lldb] [llvm] Apply modernize-use-starts-ends-with on llvm-project (PR #89140)

2024-04-19 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere closed https://github.com/llvm/llvm-project/pull/89140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 5232cec - Apply modernize-use-starts-ends-with on llvm-project (#89140)

2024-04-19 Thread via cfe-commits
Author: Nicolas van Kempen Date: 2024-04-19T14:00:13-07:00 New Revision: 5232cec8f947ed8bff4ca57f990954228d58e66d URL: https://github.com/llvm/llvm-project/commit/5232cec8f947ed8bff4ca57f990954228d58e66d DIFF: https://github.com/llvm/llvm-project/commit/5232cec8f947ed8bff4ca57f990954228d58e66d.

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. I don't totally understand the change, but I don't see anything wrong with it! https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > > Hmm, this will probably only work if you compile `A` into a PCM and then > > pass it to `B`. This is not how "Modules/preprocess-decluse.cpp" is set up. > > In our case we always have a chain A <- B <- C. A.modulemap can be affecting > for B but should not be for C

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #89453)

2024-04-19 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 45432ee - [ARM64EC] Add softintrin.lib as an implicit dependency to object files. (#89171)

2024-04-19 Thread via cfe-commits
Author: Eli Friedman Date: 2024-04-19T14:21:03-07:00 New Revision: 45432eec0ae6a7f7452196eb099814d1a7dc2c0f URL: https://github.com/llvm/llvm-project/commit/45432eec0ae6a7f7452196eb099814d1a7dc2c0f DIFF: https://github.com/llvm/llvm-project/commit/45432eec0ae6a7f7452196eb099814d1a7dc2c0f.diff

[clang] [ARM64EC] Add softintrin.lib as an implicit dependency to object files. (PR #89171)

2024-04-19 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/89171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: Thanks for the pointer to 87848 - reverting that one locally doesn't help though, even in combination with applying #89005 and #89428. So this change isn't on the critical path to fixing our builds, but still much appreciated and will take a look now. --- Unsurprisingly, th

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-19 Thread Steven Wu via cfe-commits
@@ -0,0 +1,25 @@ +// Check that a clang invocation can spawn and handshake with a module build daemon + +// RUN: %kill-process "-cc1modbuildd mbd-handshake" +// RUN: rm -rf mbd-handshake %t +// RUN: split-file %s %t + +//--- main.c +int main() {return 0;} + +// RUN: %clang -fmodu

[clang] 5bcf31e - [Clang] Loop over FieldDecls instead of all Decls (#89453)

2024-04-19 Thread via cfe-commits
Author: Bill Wendling Date: 2024-04-19T21:38:17Z New Revision: 5bcf31ebfad8b32aed20dd47be6238cc19710e63 URL: https://github.com/llvm/llvm-project/commit/5bcf31ebfad8b32aed20dd47be6238cc19710e63 DIFF: https://github.com/llvm/llvm-project/commit/5bcf31ebfad8b32aed20dd47be6238cc19710e63.diff LOG:

[clang] [Clang] Loop over FieldDecls instead of all Decls (PR #89453)

2024-04-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/89453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-19 Thread Eli Friedman via cfe-commits
@@ -826,29 +826,32 @@ const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( ASTContext &Ctx, const RecordDecl *RD, StringRef Name, uint64_t &Offset) { const LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = getLangOpts().getStrictFlexArraysLe

[clang] [Clang] Update missing varargs arg extension warnings (PR #84520)

2024-04-19 Thread via cfe-commits
Sirraide wrote: > @Sirraide, I noticed the following build issue when new compiler with this > change (bootstrap compiler) is being used to build one of the files for > `clangd`: > > ``` > .../clang-tools-extra/clangd/unittests/FindTargetTests.cpp:430:29: error: > passing no argument for the

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I updated the description of this PR, hopefully it makes more sense now. I still need to investigate what goes wrong in "Modules/preprocess-decluse.cpp". It seems that it assumes `%t/b.pcm` embeds the information from "a.modulemap". https://github.com/llvm/llvm-project/pull

[clang] [OpenACC] Implement 'num_gangs' sema for compute constructs (PR #89460)

2024-04-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/89460 num_gangs takes an 'int-expr-list', for 'parallel', and an 'int-expr' for 'kernels'. This patch changes the parsing to always parse it as an 'int-expr-list', then correct the expression count during Sema. I

[clang] [OpenACC] Implement 'num_gangs' sema for compute constructs (PR #89460)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Erich Keane (erichkeane) Changes num_gangs takes an 'int-expr-list', for 'parallel', and an 'int-expr' for 'kernels'. This patch changes the parsing to always parse it as an 'int-expr-list', then correct the expression count duri

[clang] [OpenACC] Implement 'num_gangs' sema for compute constructs (PR #89460)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes num_gangs takes an 'int-expr-list', for 'parallel', and an 'int-expr' for 'kernels'. This patch changes the parsing to always parse it as an 'int-expr-list', then correct the expression count during Sema.

[clang] [Clang] Update missing varargs arg extension warnings (PR #84520)

2024-04-19 Thread via cfe-commits
Sirraide wrote: Actually, a trailing comma in the macro invocation might work too. It’s been a while since I last had to deal w/ this. https://github.com/llvm/llvm-project/pull/84520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang] Fix crash on invalid size in user-defined `static_assert` message (PR #89420)

2024-04-19 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/89420 >From a64b08503ae9f49d8b58ee92c226ba19c450ca27 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Fri, 19 Apr 2024 19:13:26 +0200 Subject: [PATCH 1/2] [Clang] Fix crash on invalid size in static_assert message ---

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > I updated the description of this PR, hopefully it makes more sense now. I > still need to investigate what goes wrong in > "Modules/preprocess-decluse.cpp". It seems that it assumes `%t/b.pcm` embeds > the information from "a.modulemap". Is this a pre-existing issu

[clang] [Clang] Fix crash on invalid size in user-defined `static_assert` message (PR #89420)

2024-04-19 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/89420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle structs with inner structs and no fields (PR #89126)

2024-04-19 Thread Bill Wendling via cfe-commits
@@ -826,29 +826,32 @@ const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberField( ASTContext &Ctx, const RecordDecl *RD, StringRef Name, uint64_t &Offset) { const LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = getLangOpts().getStrictFlexArraysLe

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > Is this a pre-existing issue, or did my patch change to make "each textual > header gets a `HFI`"? I'm not sure yet, I think we'll need to investigate [Sam's reproducer](https://github.com/llvm/llvm-project/pull/89005#issuecomment-2067300965) and consider [Richard's com

[clang] [Clang][NFC] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/89462 Testing for the name of the flexible array member isn't as robust as testing the FieldDecl pointers. >From 2a6b3356a977132459bed84fb4e4add631e181cb Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 19 A

[clang] [Clang][NFC] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Bill Wendling (bwendling) Changes Testing for the name of the flexible array member isn't as robust as testing the FieldDecl pointers. --- Full diff: https://github.com/llvm/llvm-project/pull/89462.diff

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: > clang's headers all have proper modules now, are you sure you still need A? We can't use `clang/lib/Headers/module.modulemap`, so we need something to describe those headers. Why can't we? In our build system, it's the **build system's** job to generate modulemaps for your

[clang] [Clang][NFC] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Kees Cook via cfe-commits
kees wrote: Does this still work for cases where there are multiple flexible arrays? e.g. ``` struct weird_protocol { unsigned int cmd_type; unsigned int data_len; union { struct cmd_one one[]; struct cmd_two two[]; struct cmd_three three[]; unsigned c

[clang] [clang] Allow relational comparisons between unequal pointers to `void` in constant expressions (PR #89449)

2024-04-19 Thread via cfe-commits
https://github.com/offsetof edited https://github.com/llvm/llvm-project/pull/89449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Bill Wendling via cfe-commits
bwendling wrote: > Does this still work for cases where there are multiple flexible arrays? e.g. > > ``` > struct weird_protocol { > unsigned int cmd_type; > unsigned int data_len; > union { > struct cmd_one one[]; > struct cmd_two two[]; > struct cmd_three th

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: > Is this a pre-existing issue, or did my patch change to make "each textual > header gets a `HFI`"? My best understanding that your patch gave textual headers`HFI`s when the module map was loaded, rather than when the header was included. This shouldn't have mattered, but f

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-19 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > > Is this a pre-existing issue, or did my patch change to make "each textual > > header gets a `HFI`"? > > My best understanding that your patch gave textual headers`HFI`s when the > module map was loaded, rather than when the header was included. This > shouldn't h

[clang] [Clang][NFC] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Strictly speaking, I don't think this is NFC. Consider, for example: ``` struct S { struct X { int array[1]; } x; struct Y { int count; int array[] __attribute__((__counted_by__(count))); } y; }; void f(void* __attribute__((pass_dynamic_object_size(0; void g(struct

[clang] [Clang][NFC] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Bill Wendling via cfe-commits
bwendling wrote: > Strictly speaking, I don't think this is NFC. Consider, for example: > > ``` > struct S { > struct X { int array[1]; } x; > struct Y { int count; int array[] __attribute__((__counted_by__(count))); } > y; > }; > void f(void* __attribute__((pass_dynamic_object_size(0;

[clang] [Clang] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/89462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Bill Wendling via cfe-commits
bwendling wrote: Would changing the `decl_iterator` into a bidirectional iterator be acceptable? That way I could grab the last `FieldDecl` to check if it's a FAM rather than iterating through unnecessary `Decls`... https://github.com/llvm/llvm-project/pull/89462 __

[clang] [Clang] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If you can pull it off without increasing the size of Decl, sure; not sure it's worthwhile otherwise. https://github.com/llvm/llvm-project/pull/89462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [Clang] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Eli Friedman via cfe-commits
@@ -930,12 +931,12 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, // Get the flexible array member Decl. const RecordDecl *OuterRD = nullptr; - std::string FAMName; + const FieldDecl *FAMDecl = nullptr; if (const auto *ME = dyn_cast(Bas

[clang] [Clang] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Bill Wendling via cfe-commits
bwendling wrote: A quick look at `Decl` seems like it would require adding a `PrevInContextAndBits`, which would increase the size by `sizeof(Decl *)`. I might be able to massage a way to make it work, but it's probably not worth it. https://github.com/llvm/llvm-project/pull/89462

[clang] [Clang] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/89462 >From 2a6b3356a977132459bed84fb4e4add631e181cb Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 19 Apr 2024 15:06:34 -0700 Subject: [PATCH 1/2] [Clang][NFC] Improve testing for the flexible array member

[clang] [Clang] Improve testing for the flexible array member (PR #89462)

2024-04-19 Thread Bill Wendling via cfe-commits
@@ -930,12 +931,12 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, // Get the flexible array member Decl. const RecordDecl *OuterRD = nullptr; - std::string FAMName; + const FieldDecl *FAMDecl = nullptr; if (const auto *ME = dyn_cast(Bas

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-19 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/89473 This changes the handling of -fno-unsafe-fp-math to stop having that option imply -ftrapping-math. In gcc, -fno-unsafe-math-optimizations sets -ftrapping-math, but that dependency is based on the fact the -ftra

[clang] Fix -fno-unsafe-math-optimizations behavior (PR #89473)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Andy Kaylor (andykaylor) Changes This changes the handling of -fno-unsafe-fp-math to stop having that option imply -ftrapping-math. In gcc, -fno-unsafe-math-optimizations sets -ftrapping-math, but that dependency is based on the fact

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/89076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 7fcca11 - [clang-tidy] bugprone-lambda-function-name ignore macro in captures (#89076)

2024-04-19 Thread via cfe-commits
Author: Congcong Cai Date: 2024-04-20T07:45:20+08:00 New Revision: 7fcca112034f55c26e943c13fd0d57adfbe96705 URL: https://github.com/llvm/llvm-project/commit/7fcca112034f55c26e943c13fd0d57adfbe96705 DIFF: https://github.com/llvm/llvm-project/commit/7fcca112034f55c26e943c13fd0d57adfbe96705.diff

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread YunQiang Su via cfe-commits
wzssyqa wrote: Does it really needed? https://github.com/llvm/llvm-project/pull/89425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa edited https://github.com/llvm/llvm-project/pull/89425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa requested changes to this pull request. https://github.com/llvm/llvm-project/pull/89425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread YunQiang Su via cfe-commits
@@ -142,7 +142,7 @@ if(WIN32 OR LLVM_WINSYSROOT) set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS ${WINDOWS_LINK_FLAGS} CACHE STRING "") endif() -foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unknown-linux-gnu;riscv64-unknown-linux-gnu;x86_64-

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread YunQiang Su via cfe-commits
@@ -181,6 +181,20 @@ message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}") set(LLVM_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}") +if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(print_target_triple ${CMAKE_CXX_COMPILER} --target=${LLVM_RU

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread YunQiang Su via cfe-commits
@@ -28,6 +28,19 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (NOT LLVM_RUNTIMES_BUILD) load_llvm_config() endif() + if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) wzssyqa wrote: With my patch, `libclang_rt.builtin` has been inst

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread YunQiang Su via cfe-commits
@@ -28,6 +28,19 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (NOT LLVM_RUNTIMES_BUILD) load_llvm_config() endif() + if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) +set(print_target_triple ${CMAKE_CXX_COMPILER} --target=${LLVM_RUNTIME_TRIPLE}

<    1   2   3   4   >