[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-19 Thread via cfe-commits
https://github.com/js324 updated https://github.com/llvm/llvm-project/pull/86586 >From c822eaf87526567825e9c4403ae9f01dd4ff58a3 Mon Sep 17 00:00:00 2001 From: Jin S Date: Mon, 25 Mar 2024 17:19:41 -0400 Subject: [PATCH 1/2] [BitInt] Expose a _BitInt literal suffix in C++ ---

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-04-19 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,64 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -target-cpu core2 %s -S -emit-llvm -o - | FileCheck %s RKSimon wrote: Please can you add the i686

[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

[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] [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] 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][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

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

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes Pruning non-affecting module maps is useful even when passing module maps explicitly via `-fmodule-map-file=path`. For this situation, this patch reinstates the behavior we had prior to #87849. For the

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

2024-04-19 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > Unfortunately with this patch I'm still seeing the same > source-location-exhausted error. I'm going to try to understand why... Damn I really thought that was going to be the one. If you have any way I could reproduce or better write a test that would be great.

[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)

2024-04-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: > but since we only care about stdout/stderr, throw away the output file and > just write to /dev/null instead. Since `-emit-llvm-only` is now used, the commit message should be updated. https://github.com/llvm/llvm-project/pull/89242

[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)

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

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

2024-04-19 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: (Only commit c68b6468347e0a6141ff312139a82a3a8be9ce2e is relevant here, the other one is from #89428.) https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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] [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

[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,

[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-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] [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

[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

[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,

[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][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][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

[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits
Troy-Butler wrote: > > Isn't the warning about a mismatch between declaration and definition, not > > call args? The InstCombine change does make the definition and declaration > > match. > > […](#) > > On Fri, Apr 19, 2024, at 17:07, Mehdi Amini wrote: _**@**_. commented > > on this pull

[clang] [libclang] Compute the right spelling location (PR #72400)

2024-04-19 Thread Jan Svoboda via cfe-commits
@@ -1292,6 +1292,31 @@ void func() {} EXPECT_EQ(attrCount, 1); } +TEST_F(LibclangParseTest, clang_getSpellingLocation) { + std::string fileName = "main.c"; + WriteFile(fileName, "#define X(value) int x = value;\nX(42)\n"); + + ClangTU = clang_parseTranslationUnit(Index,

[clang] [flang] [flang] Default -g to full debug info. (PR #89418)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-flang-driver Author: None (abidh) Changes Currently, -g defaults to line tables only. This PR changes that to full debug information. This will allow us to test/use the upcoming debug info changes. --- Full diff:

[clang] [flang] [flang] Default -g to full debug info. (PR #89418)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (abidh) Changes Currently, -g defaults to line tables only. This PR changes that to full debug information. This will allow us to test/use the upcoming debug info changes. --- Full diff:

[clang] [llvm] [ARM] Armv8-R does not require fp64 or neon. (PR #88287)

2024-04-19 Thread Chris Copeland via cfe-commits
chrisnc wrote: I've updated the PR to use the proposed approach of making `"generic"` the default CPU for armv8r. Let me know if this is alright. I still need to fix up a few of the tests to match this new behavior. https://github.com/llvm/llvm-project/pull/88287

[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 created https://github.com/llvm/llvm-project/pull/89428 Pruning non-affecting module maps is useful even when passing module maps explicitly via `-fmodule-map-file=`. For this situation, this patch reinstates the behavior we had prior to #87849. For the

[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
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89031 >From 3c9698f033c2349e698a5c98f227bfee8499e5b4 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Fri, 19 Apr 2024 07:51:17 + Subject: [PATCH] [clang-repl] Keep the first llvm::Module empty to avoid

[clang] 30b9537 - [Driver] Add m_Group to -m[no-]strict-align

2024-04-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-19T11:52:02-07:00 New Revision: 30b9537ff438366547f968c7909718e27d65c815 URL: https://github.com/llvm/llvm-project/commit/30b9537ff438366547f968c7909718e27d65c815 DIFF: https://github.com/llvm/llvm-project/commit/30b9537ff438366547f968c7909718e27d65c815.diff

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-04-19 Thread Eli Friedman via cfe-commits
@@ -8001,6 +8007,22 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +// SME functions may require SVE to be available for unwinding, as the +// value of VG needs to be preserved across streaming-mode changes. +if (CallerFD

[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

[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-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] 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] [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

[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] 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

[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] [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

[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

[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

[clang] Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (PR #89036)

2024-04-19 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/89036 >From 56c2b4f70735a6ef3b80cb8461a88ea51f2d02d7 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 16 Apr 2024 17:48:45 +0530 Subject: [PATCH 1/5] [Clang][Sema] placement new initializes typedef array with

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

2024-04-19 Thread via cfe-commits
cor3ntin wrote: The change LGTM but it does need a release note Thanks for fixing that! 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] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes When using Clang as a compiler, use Clang to normalize the triple that's used to construct path for runtime library build and install paths. This ensures that paths are consistent and avoids the issue where

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

2024-04-19 Thread Petr Hosek via cfe-commits
petrhosek wrote: This is a re-upload of https://reviews.llvm.org/D140925, I plan to land this change if there are no objections. https://github.com/llvm/llvm-project/pull/89425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-19 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/89425 When using Clang as a compiler, use Clang to normalize the triple that's used to construct path for runtime library build and install paths. This ensures that paths are consistent and avoids the issue where

[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: Hmm, I locally reverted https://github.com/llvm/llvm-project/pull/87849 and still see the same issue. I'll patch #89428 instead, but I don't see how it could do better - it's just putting the old and new behavior of #87849 behind a flag, right? In any case I'll try it, and

[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
@@ -364,6 +365,19 @@ IncrementalParser::Parse(llvm::StringRef input) { std::unique_ptr IncrementalParser::GenModule() { static unsigned ID = 0; if (CodeGenerator *CG = getCodeGen()) { +// Clang's CodeGen is designed to work with a single llvm::Module. In many +//

[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-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-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:

[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] [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

[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.

[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".

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-04-19 Thread Krishna Narayanan via cfe-commits
https://github.com/Krishna-13-cyber updated https://github.com/llvm/llvm-project/pull/89362 >From 4e649d105a2af038e6dbd0e93b457eebea2e543a Mon Sep 17 00:00:00 2001 From: Krishna-13-cyber Date: Fri, 19 Apr 2024 15:09:26 +0530 Subject: [PATCH 1/2] Add optimised LLVM IR for atomic

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

2024-04-19 Thread via cfe-commits
zibi2 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 '...' parameter

[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

[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] 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

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

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes This addresses two problems observed in #89407 wrt user-defined `static_assert` messages: 1. In `Expr::EvaluateCharRangeAsString`, we were calling `getExtValue()` instead of `getZExtValue()`, which would assert

[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: Unfortunately with this patch I'm still seeing the same source-location-exhausted error. I'm going to try to understand why... https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [AMDGPU][WIP] Add support for i64/f64 readlane, writelane and readfirstlane operations. (PR #89217)

2024-04-19 Thread Vikram Hegde via cfe-commits
vikramRH wrote: Added/updated tests for readfirstlane and writelane ops https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] 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

[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

[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] [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:

[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

[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] [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 , const RecordDecl *RD, StringRef Name, uint64_t ) { const LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = getLangOpts().getStrictFlexArraysLevel(); -

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

2024-04-19 Thread Richard Smith via cfe-commits
zygoloid wrote: > Unfortunately with this patch I'm still seeing the same > source-location-exhausted error. Can you try applying #89428 as well? I think we would need both in order to prune the module map from the serialized SLocEntries. https://github.com/llvm/llvm-project/pull/89005

[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 updated https://github.com/llvm/llvm-project/pull/89428 >From baa15bb0f35e3f9845407c6b843b82c3a466369f Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 10:28:33 -0700 Subject: [PATCH 1/2] [clang][modules] Only avoid pruning module maps when

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

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/89441 Depends on #89428. >From baa15bb0f35e3f9845407c6b843b82c3a466369f Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 10:28:33 -0700 Subject: [PATCH 1/2] [clang][modules] Only avoid pruning

[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 updated https://github.com/llvm/llvm-project/pull/89428 >From baa15bb0f35e3f9845407c6b843b82c3a466369f Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 10:28:33 -0700 Subject: [PATCH] [clang][modules] Only avoid pruning module maps when asked to

[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-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

[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 , const RecordDecl *RD, StringRef Name, uint64_t ) { const LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel = getLangOpts().getStrictFlexArraysLevel(); -

[clang] [flang] [flang] Default -g to full debug info. (PR #89418)

2024-04-19 Thread via cfe-commits
https://github.com/abidh created https://github.com/llvm/llvm-project/pull/89418 Currently, -g defaults to line tables only. This PR changes that to full debug information. This will allow us to test/use the upcoming debug info changes. >From e0391084e9f8fad55c08cc642079afd8923b2729 Mon Sep 17

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

2024-04-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Thank you! 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][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] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

2024-04-19 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 29ecd6d50f14 https://github.com/llvm/llvm-project/actions/runs/8756865337 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-project/compare)

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-04-19 Thread Krishna Narayanan via cfe-commits
https://github.com/Krishna-13-cyber ready_for_review https://github.com/llvm/llvm-project/pull/89362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 created https://github.com/llvm/llvm-project/pull/89420 This addresses two problems observed in #89407 wrt user-defined `static_assert` messages: 1. In `Expr::EvaluateCharRangeAsString`, we were calling `getExtValue()` instead of `getZExtValue()`, which would

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

2024-04-19 Thread via cfe-commits
Sirraide wrote: > The change LGTM but it does need a release note. Oh, yeah, I somehow forgot about that because I got distracted by the second bug; will do. https://github.com/llvm/llvm-project/pull/89420 ___ cfe-commits mailing list

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

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes Depends on #89428. --- Full diff: https://github.com/llvm/llvm-project/pull/89441.diff 8 Files Affected: - (modified) clang/include/clang/Driver/Options.td (+5) -

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

2024-04-19 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: https://github.com/llvm/llvm-project/pull/89441 might be of interest too. https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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

[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

[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][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

  1   2   3   4   >