[clang] [clang][bytecode] Initialize bases when bitcasting (PR #117179)

2024-12-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117179 >From 7c6ce4a06c822c59553dc701dc876b71f33397ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 21 Nov 2024 16:56:08 +0100 Subject: [PATCH] [clang][bytecode] Initialize bases when bitcast

[clang] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-04 Thread David Green via cfe-commits
davemgreen wrote: > I prefer `-mcpu=fujitsu-monaka`. I want to include `fujitsu` because > `FUJITSU-MONAKA` is the official name. > > I fixed the issues related to sve2aes. Sounds good, either sounds OK to me. LGTM https://github.com/llvm/llvm-project/pull/118432 _

[clang] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-04 Thread David Green via cfe-commits
https://github.com/davemgreen approved this pull request. https://github.com/llvm/llvm-project/pull/118432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0adab6b - [AArch64][Clang] Define __ARM_NEON_SVE_BRIDGE unconditionally (#118272)

2024-12-04 Thread via cfe-commits
Author: SpencerAbson Date: 2024-12-04T11:32:05Z New Revision: 0adab6b1af5b1874099b1e97fdcea2ce5020d79a URL: https://github.com/llvm/llvm-project/commit/0adab6b1af5b1874099b1e97fdcea2ce5020d79a DIFF: https://github.com/llvm/llvm-project/commit/0adab6b1af5b1874099b1e97fdcea2ce5020d79a.diff LOG:

[clang] [AArch64][Clang] Define __ARM_NEON_SVE_BRIDGE unconditionally (PR #118272)

2024-12-04 Thread via cfe-commits
https://github.com/SpencerAbson closed https://github.com/llvm/llvm-project/pull/118272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-04 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/118544 >From e028f19f1b4154e44c61e371ae5feeb522085338 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Tue, 3 Dec 2024 20:22:37 + Subject: [PATCH] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM

[clang] [AArch64][Clang] Define __ARM_NEON_SVE_BRIDGE unconditionally (PR #118272)

2024-12-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/11544 Here is the releva

[clang] [AArch64][SVE] Fold svrev(svrev(v)) to v (PR #116422)

2024-12-04 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: Is this intentionally left as a draft? https://github.com/llvm/llvm-project/pull/116422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [XRay][RISCV] RISCV support for XRay (PR #117368)

2024-12-04 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,87 @@ +//===-- xray_trampoline_riscv32.s --*- ASM -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

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

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-04 Thread via cfe-commits
https://github.com/SpencerAbson commented: Thank you, Jonathan! We would also want feature and immediate range tests - E.,g [Immediate argument tests](https://github.com/llvm/llvm-project/blob/e804d5f7cc459b9310122ed5405bba5c4d6a2350/clang/test/Sema/aarch64-fp8-intrinsics/acle_sme2_fp8_imm.c)

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-04 Thread via cfe-commits
@@ -740,6 +740,11 @@ let SMETargetGuard = "sme2" in { def SVLUTI4_LANE_ZT_X2 : Inst<"svluti4_lane_zt_{d}_x2", "2.di[i", "cUcsUsiUibhf", MergeNone, "aarch64_sme_luti4_lane_zt_x2", [IsStreaming, IsInZT0], [ImmCheck<0, ImmCheck0_0>, ImmCheck<2, ImmCheck0_3>]>; } +// FDOT

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-04 Thread via cfe-commits
@@ -5737,3 +5768,113 @@ multiclass sme2_fmop4a_fp8_fp16_2way { // Multiple vectors def _M2Z2Z_BtoH : sme2_fp8_fp16_quarter_tile_outer_product<0b1, 0b1, mnemonic, ZZ_b_mul_r_Lo, ZZ_b_mul_r_Hi>; } + +// FP8 SME FDOT instructions + +// Selection DAG patterns - map to first le

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-04 Thread via cfe-commits
@@ -219,6 +219,37 @@ class SME2_Tile_Movaz_Pat(name # _PSEUDO) $tile, $base, $offset)>; + +// FP8 SME FDOT instructions + +// Selection DAG patterns - map to first level of pseudo-instructions (xxx_PSEUDO) +class SME2_FP8_FMLA_FDOT_Index_VG1x2_Pat + : Pat<(intrinsic (i32 (tile

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-04 Thread via cfe-commits
@@ -219,6 +219,37 @@ class SME2_Tile_Movaz_Pat(name # _PSEUDO) $tile, $base, $offset)>; + +// FP8 SME FDOT instructions + +// Selection DAG patterns - map to first level of pseudo-instructions (xxx_PSEUDO) +class SME2_FP8_FMLA_FDOT_Index_VG1x2_Pat + : Pat<(intrinsic (i32 (tile

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-04 Thread via cfe-commits
@@ -986,8 +986,8 @@ def LUTI4_S_4ZZT2Z : sme2_luti4_vector_vg4_strided<0b00, 0b00, "luti4">; let Predicates = [HasSMEF8F16] in { defm FVDOT_VG2_M2ZZI_BtoH : sme2p1_multi_vec_array_vg2_index_f8f16<"fvdot", 0b11, 0b110, ZZ_b_mul_r, ZPR4b8>; -defm FDOT_VG2_M2ZZI_BtoH : sme2p1

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-04 Thread via cfe-commits
@@ -740,6 +740,11 @@ let SMETargetGuard = "sme2" in { def SVLUTI4_LANE_ZT_X2 : Inst<"svluti4_lane_zt_{d}_x2", "2.di[i", "cUcsUsiUibhf", MergeNone, "aarch64_sme_luti4_lane_zt_x2", [IsStreaming, IsInZT0], [ImmCheck<0, ImmCheck0_0>, ImmCheck<2, ImmCheck0_3>]>; } +// FDOT +let

[clang] [llvm] [AArch64] Add intrinsics for SME FP8 FDOT LANE instructions (PR #118492)

2024-12-04 Thread via cfe-commits
@@ -0,0 +1,57 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// REQUIRES: aarch64-registered-target +#include + +// RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -target

[clang] 026fbe5 - [clang][www] Remove ClangDataFormat.py from docs (#117943)

2024-12-04 Thread via cfe-commits
Author: Maksim Ivanov Date: 2024-12-04T12:53:31Z New Revision: 026fbe519e16a4993601d2bac509e182081fc068 URL: https://github.com/llvm/llvm-project/commit/026fbe519e16a4993601d2bac509e182081fc068 DIFF: https://github.com/llvm/llvm-project/commit/026fbe519e16a4993601d2bac509e182081fc068.diff LOG:

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

2024-12-04 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/117943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

2024-12-04 Thread via cfe-commits
github-actions[bot] wrote: @emaxx-google Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a b

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

2024-12-04 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. Not sure how well maintained these are either, but since they still exist, LGTM https://github.com/llvm/llvm-project/pull/117943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)

2024-12-04 Thread Yihe Li via cfe-commits
@@ -1615,22 +1615,24 @@ QualType CallExpr::getCallReturnType(const ASTContext &Ctx) const { return FnType->getReturnType(); } -const Attr *CallExpr::getUnusedResultAttr(const ASTContext &Ctx) const { +std::pair +CallExpr::getUnusedResultAttr(const ASTContext &Ctx) const { +

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-12-04 Thread via cfe-commits
Discookie wrote: ``::open`` and ``::std::fstream::open`` are matched as two different things already. ```c++ #include #include void f() { int fd = open("file.txt", O_RDONLY, 0); std::ifstream file; file.open("file.txt"); } ``` ``` -- matches ::open {CheckOptions:{bugprone-unsafe-func

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-04 Thread Bo Anderson via cfe-commits
Bo98 wrote: > The expected flow on Apple platforms is to only pass an `isysroot` argument > whether it's inherited from `xcrun -sdk clang` or passed > explicitly. Could homebrew instead only pass `isysroot` for Darwin targets? > Or check that `sysroot` and `isysroot` inputs are the same when

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

2024-12-04 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Thanks for the review and for the merge! > Not sure how well maintained these are either, but since they still exist, > LGTM If you mean the `lldbDataFormatters.py` script, then I don't know either, but at least when I tried it it turned out to be useful. https://github.c

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-04 Thread via cfe-commits
@@ -0,0 +1,151 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] Call setup_host_tools for more tools. (PR #118635)

2024-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Harald van Dijk (hvdijk) Changes This change allows external projects to call for host versions of clang-offload-bundler, clang-offload-packager, and llvm-ar. This has no effect in LLVM itself, which does not make use of this, but is goi

[clang] [Clang] Fix typo in ItaniumRecordLayoutBuilder API (PR #118563)

2024-12-04 Thread Eric Wang via cfe-commits
@@ -818,7 +818,7 @@ class ItaniumRecordLayoutBuilder { void setSize(CharUnits NewSize) { Size = Context.toBits(NewSize); } void setSize(uint64_t NewSize) { Size = NewSize; } - CharUnits getAligment() const { return Alignment; } + CharUnits getAlignment() const { return A

[clang] [clang] Fix missing check for nullptr in CallExpr::getUnusedResultAttr (PR #118636)

2024-12-04 Thread Yihe Li via cfe-commits
https://github.com/Mick235711 created https://github.com/llvm/llvm-project/pull/118636 Fixes #117975, a regression introduced by #112521 due to me forgetting to check for `nullptr` before dereferencing in `CallExpr::getUnusedResultAttr`. A regression test has been added as per the comments on t

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-04 Thread via cfe-commits
qt-tatiana wrote: > Nit tip: the additional `fixup!` in the commit message for each additional > commit is rather distracting, it would be best if each commit were be named > after the changes it introduces w.r.t. the previous commit. Ok, thanks! Started to use it in my next commits https://g

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-12-04 Thread Daniil Kovalev via cfe-commits
@@ -35,6 +35,16 @@ AArch64TargetStreamer::AArch64TargetStreamer(MCStreamer &S) AArch64TargetStreamer::~AArch64TargetStreamer() = default; +void AArch64TargetStreamer::emitAuthValue(const MCExpr *Expr, + uint16_t Discriminator, +

[clang] [llvm] Call setup_host_tools for more tools. (PR #118635)

2024-12-04 Thread James Henderson via cfe-commits
jh7370 wrote: > This has no effect in LLVM itself, which does not make use of this, but is > going to be used in DPC++'s libsycl. That is meant to be upstreamed at some > point, so it probably makes sense to get this into LLVM already and avoid > future conflicts. I don't know what others wou

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-04 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis created https://github.com/llvm/llvm-project/pull/118640 When these options were enabled for flang the visibility was also extended to clang-cl and dxc. I believe this was due to a misunderstanding of the default value for `Visibility`. This is marked as draft beca

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2024-12-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk ready_for_review https://github.com/llvm/llvm-project/pull/118566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2024-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #54334 --- Full diff: https://github.com/llvm/llvm-project/pull/118566.diff 11 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/include/clang/Format/Format.h (+9-

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2024-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Oleksandr T. (a-tarasyuk) Changes Fixes #54334 --- Full diff: https://github.com/llvm/llvm-project/pull/118566.diff 11 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/include/clang/Format/Format

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-12-04 Thread Raphael Moreira Zinsly via cfe-commits
https://github.com/rzinsly updated https://github.com/llvm/llvm-project/pull/117612 >From 708dce34f76fc361a2093459efd3b14705045f6f Mon Sep 17 00:00:00 2001 From: Raphael Moreira Zinsly Date: Mon, 25 Nov 2024 14:51:35 -0300 Subject: [PATCH 1/2] [RISCV] Add initial stack clash protection Enable

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

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

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-04 Thread via cfe-commits
yronglin wrote: > Is the PR description still up-to-date? Yeah! The description out-of-date. https://github.com/llvm/llvm-project/pull/113049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-04 Thread Mészáros Gergely via cfe-commits
@@ -1055,11 +1055,11 @@ def z : Separate<["-"], "z">, Flags<[LinkerInput]>, def offload_link : Flag<["--"], "offload-link">, Group, HelpText<"Use the new offloading linker to perform the link job.">; def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-04 Thread Mészáros Gergely via cfe-commits
@@ -1989,7 +1989,7 @@ def : Flag<["-"], "fno-diagnostics-color">, Group, Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, Alias; def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group, - Visibility<[ClangOption, CLOption, DXCOption, FlangOpti

[clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-04 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118569 >From d2257eb43bbd9ce2dfd8a13123c2048e1cf8b439 Mon Sep 17 00:00:00 2001 From: chomosuke Date: Wed, 4 Dec 2024 00:07:31 + Subject: [PATCH 1/3] clangd cleanupAroundReplacements just as clang-tidy does ---

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-04 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: @tarunprabhu Continuing [our discussion on #108868](https://github.com/llvm/llvm-project/pull/108868/files/612b93eda5695306293bb8ca6e27a810b06adf3d#r1867949328) here. These are what I found, by searching for commits that added both `FlangOption` and `CLOption` to Options.td and

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-12-04 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/113149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-12-04 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > LGTM > > I expect some discussion in the description / commit message why > AArch64JumpTableHardening is placed together with other `PointerAuth*` > options. @MaskRay Thanks for feedback, please let me know if the following description addresses your comment: > The flag is

[clang] [flang] [flang][Driver] Support -nostdlib and -nodefaultlibs (PR #108868)

2024-12-04 Thread Mészáros Gergely via cfe-commits
@@ -5572,7 +5572,8 @@ def : Flag<["-"], "nocudalib">, Alias; def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Link the LLVM C Library for GPUs">; def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, C

[clang] [clang][NFC] Generalize getSpecificAttr for const attributes (PR #116606)

2024-12-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/116606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-04 Thread Stephen Tozer via cfe-commits
@@ -1353,6 +1353,19 @@ void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) { C->setDoesNotThrow(); } +void CodeGenFunction::EmitFakeUse(Address Addr) { + // We do not emit a fake use if we want to apply optnone to this function, + // even if we mig

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2024-12-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/118566 >From 75da343b0bd6e3b0f3219b349f6be4c882947820 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 4 Dec 2024 02:24:12 +0200 Subject: [PATCH 1/3] [clang-format] extend clang-format directive with options t

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Ah thank you for the more detailed explanation, this makes sense to me. LG! https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang][NFC] Generalize getSpecificAttr for const attributes (PR #116606)

2024-12-04 Thread Balazs Benics via cfe-commits
steakhal wrote: Thanks Aaron! https://github.com/llvm/llvm-project/pull/116606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Generalize getSpecificAttr for const attributes (PR #116606)

2024-12-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/116606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-04 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer edited https://github.com/llvm/llvm-project/pull/110102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/118455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-12-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/117487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-04 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: @HaohaiWen can you check if this makes sense for clang-cl? @bob80905 same for DXC please. https://github.com/llvm/llvm-project/pull/118640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang][bytecode] Not all null pointers are 0 (PR #118601)

2024-12-04 Thread Sven van Haastregt via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -no-enable-noundef-analysis %s -cl-std=CL2.0 -include opencl-c.h -triple amdgcn -emit-llvm -o - | FileCheck %s svenvh wrote: I don't think you need the `-include opencl-c.h` for this test? (it's rather big, so slows down tes

[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)

2024-12-04 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: Thanks for this. I think you have caught all everything I changed. But I'll take another look to see if there was anything else. https://github.com/llvm/llvm-project/pull/118640 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [llvm] Call setup_host_tools for more tools. (PR #118635)

2024-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-binary-utilities Author: Harald van Dijk (hvdijk) Changes This change allows external projects to call for host versions of clang-offload-bundler, clang-offload-packager, and llvm-ar. This has no effect in LLVM itself, which does not make use of t

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2024-12-04 Thread Stephen Tozer via cfe-commits
@@ -1834,6 +1834,14 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.setInlining(CodeGenOptions::NormalInlining); } + // If we have specified -Og and have not explicitly set -fno-extend-lifetimes, + // then default to -fextend-li

[clang] [Clang] [Sema] Support matrix types in pseudo-destructor expressions (PR #117483)

2024-12-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -fsyntax-only -fenable-matrix -std=c++11 -verify %s AaronBallman wrote: Does this need to be in C++11 mode explicitly? https://github.com/llvm/llvm-project/pull/117483 ___ cfe-commi

[clang] 2e85138 - [clang][NFC] Generalize getSpecificAttr for const attributes (#116606)

2024-12-04 Thread via cfe-commits
Author: Balazs Benics Date: 2024-12-04T15:17:47+01:00 New Revision: 2e85138c0d06c0cc17569d375ce7a75e60cc6dd0 URL: https://github.com/llvm/llvm-project/commit/2e85138c0d06c0cc17569d375ce7a75e60cc6dd0 DIFF: https://github.com/llvm/llvm-project/commit/2e85138c0d06c0cc17569d375ce7a75e60cc6dd0.diff

[clang] [clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-04 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118569 >From d2257eb43bbd9ce2dfd8a13123c2048e1cf8b439 Mon Sep 17 00:00:00 2001 From: chomosuke Date: Wed, 4 Dec 2024 00:07:31 + Subject: [PATCH 1/4] clangd cleanupAroundReplacements just as clang-tidy does ---

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-12-04 Thread Paul T Robinson via cfe-commits
@@ -1353,6 +1353,19 @@ void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) { C->setDoesNotThrow(); } +void CodeGenFunction::EmitFakeUse(Address Addr) { + // We do not emit a fake use if we want to apply optnone to this function, + // even if we mig

[clang] [clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-04 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118569 >From d2257eb43bbd9ce2dfd8a13123c2048e1cf8b439 Mon Sep 17 00:00:00 2001 From: chomosuke Date: Wed, 4 Dec 2024 00:07:31 + Subject: [PATCH 1/4] clangd cleanupAroundReplacements just as clang-tidy does ---

[clang] [llvm] [PAC][ELF][AArch64] Support signed personality function pointer (PR #113148)

2024-12-04 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113148 >From 9d7f4eb9a99a7d765095f571f5a209164862fe49 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 13:28:58 +0300 Subject: [PATCH 1/4] [PAC][ELF][AArch64] Support signed personality function p

[clang] [clang-format] extend clang-format directive with options to prevent formatting for one line (PR #118566)

2024-12-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/118566 >From 75da343b0bd6e3b0f3219b349f6be4c882947820 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 4 Dec 2024 02:24:12 +0200 Subject: [PATCH 1/2] [clang-format] extend clang-format directive with options t

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2024-12-04 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118568 >From b43a2602025bdacea06ced5171904fb5d765de9f Mon Sep 17 00:00:00 2001 From: chomosuke Date: Tue, 3 Dec 2024 07:10:33 + Subject: [PATCH] fixed removeFunctionArgs don't remove comma --- .../clang-tidy/ut

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-04 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/118455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8271195 - [Clang] Deleting an incomplete enum type is not an error (#118455)

2024-12-04 Thread via cfe-commits
Author: cor3ntin Date: 2024-12-04T15:31:19+01:00 New Revision: 8271195de05742ed7079d7882fbebc2daecbd7e2 URL: https://github.com/llvm/llvm-project/commit/8271195de05742ed7079d7882fbebc2daecbd7e2 DIFF: https://github.com/llvm/llvm-project/commit/8271195de05742ed7079d7882fbebc2daecbd7e2.diff LOG:

[clang] [Clang] [Sema] Support matrix types in pseudo-destructor expressions (PR #117483)

2024-12-04 Thread via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -fsyntax-only -fenable-matrix -std=c++11 -verify %s Sirraide wrote: I think I copied that from one of the other tests, but I don’t think it’s needed; I’ll remove it https://github.com/llvm/llvm-project/pull/117483 __

[clang] [Clang] [Sema] Support matrix types in pseudo-destructor expressions (PR #117483)

2024-12-04 Thread via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -fsyntax-only -fenable-matrix -std=c++11 -verify %s +// expected-no-diagnostics + +template +void f() { + T().~T(); +} + +template +void f1(T *f) { Sirraide wrote: Probably a good idea https://github.com/llvm/llvm-project/

[clang] [llvm] Call setup_host_tools for more tools. (PR #118635)

2024-12-04 Thread Harald van Dijk via cfe-commits
hvdijk wrote: > I don't know what others would think about this, but without the subsequent > changes that make use of this, I don't think this should be landed in LLVM. > After all, plans might change, the community might refuse the subsequent PRs > etc, resulting in dead code lying around.

[clang] [clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-04 Thread Richard Li via cfe-commits
https://github.com/chomosuke edited https://github.com/llvm/llvm-project/pull/118569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-04 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118569 >From d2257eb43bbd9ce2dfd8a13123c2048e1cf8b439 Mon Sep 17 00:00:00 2001 From: chomosuke Date: Wed, 4 Dec 2024 00:07:31 + Subject: [PATCH 1/4] clangd cleanupAroundReplacements just as clang-tidy does ---

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2024-12-04 Thread Richard Li via cfe-commits
chomosuke wrote: General cased fixed in #118569 https://github.com/llvm/llvm-project/pull/118568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Do not apply fast-math to the logic intriniscs (PR #118603)

2024-12-04 Thread Matt Arsenault via cfe-commits
@@ -167,6 +167,8 @@ _mm512_maskz_mullo_epi64(__mmask8 __U, __m512i __A, __m512i __B) { (__v8di)_mm512_setzero_si512()); } +#pragma float_control(push) arsenm wrote: Needs tests https://github.com/llvm/llvm-proje

[clang] [clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-04 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118569 >From efc17a803c9c22543de7d5f9e960a7267ade1f2e Mon Sep 17 00:00:00 2001 From: chomosuke Date: Wed, 4 Dec 2024 14:42:24 + Subject: [PATCH] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplace

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-04 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/113049 >From 804b1032cb23cea8fa705a0d2130b1f95185c949 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 20 Nov 2024 23:45:59 +0800 Subject: [PATCH 1/5] [clang] Fix a crash issue that caused by handling of fields wit

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-12-04 Thread via cfe-commits
cor3ntin wrote: I think we need more discussion before enabling that by default tbh. as @HerrCai0907 mentioned people who do custom rtti or crtp sort of need to be able to use static_cast in some cases https://github.com/llvm/llvm-project/pull/117914 ___

[clang] [clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-04 Thread Richard Li via cfe-commits
https://github.com/chomosuke ready_for_review https://github.com/llvm/llvm-project/pull/118569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-04 Thread via cfe-commits
@@ -750,6 +750,18 @@ void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, if (Field->hasInClassInitializer()) { if (VerifyOnly) return; + + // We do not want to aggressively set the hadError flag and cutoff + // parsing. Tr

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2024-12-04 Thread via cfe-commits
yronglin wrote: friendly ping~ https://github.com/llvm/llvm-project/pull/117437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Richard Li (chomosuke) Changes The problem: When running the code action for some clang-tidy checks with clangd, there will be commas left over after the code action is completed, causing a compile error and requiring the user

[clang] [clang] Fix crash when compiling error with invalid decl (PR #77893)

2024-12-04 Thread Erich Keane via cfe-commits
@@ -40,7 +40,11 @@ static_assert( "Type is insufficiently aligned"); APValue::LValueBase::LValueBase(const ValueDecl *P, unsigned I, unsigned V) -: Ptr(P ? cast(P->getCanonicalDecl()) : nullptr), Local{I, V} {} +: Ptr(P ? cast(P->getCanonicalDecl()->isInvalidDecl()

[clang] [X86] Do not apply fast-math to the logic intriniscs (PR #118603)

2024-12-04 Thread Phoebe Wang via cfe-commits
@@ -167,6 +167,8 @@ _mm512_maskz_mullo_epi64(__mmask8 __U, __m512i __A, __m512i __B) { (__v8di)_mm512_setzero_si512()); } +#pragma float_control(push) phoebewang wrote: Thanks, this is just an experiment. Unfortun

[clang] [clang][bytecode] Not all null pointers are 0 (PR #118601)

2024-12-04 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -no-enable-noundef-analysis %s -cl-std=CL2.0 -include opencl-c.h -triple amdgcn -emit-llvm -o - | FileCheck %s tbaederr wrote: Ah, nice. Thanks https://github.com/llvm/llvm-project/pull/118601 ___

[clang] [clang][bytecode] Not all null pointers are 0 (PR #118601)

2024-12-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/118601 >From a929550c4b36001c0c6e2b119fc97ba4e31aa50a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 4 Dec 2024 08:37:24 +0100 Subject: [PATCH] [clang][bytecode] Not all null pointers are 0 G

[clang] [clang][bytecode] Pass __builtin_memcpy size along (PR #118649)

2024-12-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118649 To DoBitCastPtr, so we know how many bytes we want to read. >From 1430ff275074381f2ce8321e7e6e37aee0588c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 4 Dec 2024 13:30:51 +0100 Subj

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-04 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: Looking at the test failure, it appears that when only building `check-clang-tools`, no `clang` binary was built. So the test driver cannot find `clang`. Maybe this diagnostics binary file should be checked in for the test? That will not catch future errors if the diagnos

[clang] [clang][bytecode] Pass __builtin_memcpy size along (PR #118649)

2024-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes To DoBitCastPtr, so we know how many bytes we want to read. --- Full diff: https://github.com/llvm/llvm-project/pull/118649.diff 4 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+1-

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-12-04 Thread David Truby via cfe-commits
https://github.com/DavidTruby commented: This LGTM but I think the other reviewers need to take a look too. Can you change the title and description of the PR/commit to represent that what we're doing is different now? https://github.com/llvm/llvm-project/pull/117573 ___

[clang] [HLSL] Fix call convention mismatch for ctor/dtor (PR #118651)

2024-12-04 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts created https://github.com/llvm/llvm-project/pull/118651 Before this patch, there was a calling-convention mismatch between the constructors and the actual call emitted for the entrypoint wrapper. Such mismatch causes the InstCombine pass to replace this call with an

[clang] [HLSL] Fix call convention mismatch for ctor/dtor (PR #118651)

2024-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Nathan Gauër (Keenuts) Changes Before this patch, there was a calling-convention mismatch between the constructors and the actual call emitted for the entrypoint wrapper. Such mismatch causes the InstCombine pass to replace this call with

[clang] [clang][bytecode] Not all null pointers are 0 (PR #118601)

2024-12-04 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh commented: LGTM, but I'm not an expert in this area so I'll leave the formal approval to someone else. https://github.com/llvm/llvm-project/pull/118601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-04 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Support matrix types in pseudo-destructor expressions (PR #117483)

2024-12-04 Thread Erich Keane via cfe-commits
@@ -368,3 +368,36 @@ void test_use_matrix_2() { selector<2> r5 = use_matrix_3(m1); } + +// CHECK-LABEL: define void @_Z22test_pseudo_destructorv() +// CHECK-NEXT: entry: +// CHECK-NEXT: %a = alloca [25 x double], align 8 erichkeane wrote: probably want to

[clang] [Clang] [Sema] Support matrix types in pseudo-destructor expressions (PR #117483)

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

[clang] [flang] [flang][Driver] Support -nostdlib and -nodefaultlibs (PR #108868)

2024-12-04 Thread Andrzej Warzyński via cfe-commits
@@ -5572,7 +5572,8 @@ def : Flag<["-"], "nocudalib">, Alias; def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Link the LLVM C Library for GPUs">; def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, C

<    1   2   3   4   5   >