[clang] [clang] [NFC] In GetDiagForGotoScopeDecl(), limit Init to inside the if condition (PR #116080)

2024-11-19 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb closed https://github.com/llvm/llvm-project/pull/116080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)

2024-11-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/116843 >From e0304bffdaba9cd0ce14c310882814d7045a0357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Nov 2024 14:37:56 +0100 Subject: [PATCH] [clang][bytecode] Handle bitcasts involving bitf

[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)

2024-11-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/116843 >From caf66b089176d1952fa8935db3532eb3ef112b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Nov 2024 14:37:56 +0100 Subject: [PATCH] [clang][bytecode] Handle bitcasts involving bitf

[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)

2024-11-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/116843 >From bc8a11a461210bad8348af28bdd6f6d3aeae2dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Nov 2024 14:37:56 +0100 Subject: [PATCH] [clang][bytecode] Handle bitcasts involving bitf

[clang] [Clang] update reasoned delete diagnostic kind to use Extension, making it pedantic only (PR #114713)

2024-11-19 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/114713 >From c07fa270194eadde3ccecab368b2225702fc2e63 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 3 Nov 2024 19:22:56 +0200 Subject: [PATCH 1/2] [Clang] update reasoned delete diagnostic kind to use Exten

[libclc] [libclc] Move several integer functions to CLC library (PR #116786)

2024-11-19 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,44 @@ +#include +#include +#include + +_CLC_OVERLOAD _CLC_DEF char __clc_clz(char x) { + return __clc_clz((ushort)(uchar)x) - 8; +} + +_CLC_OVERLOAD _CLC_DEF uchar __clc_clz(uchar x) { + return __clc_clz((ushort)x) - 8; +} + +_CLC_OVERLOAD _CLC_DEF short __clc_clz(

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via cfe-commits
bwendling wrote: I removed the Placeholder code. It's a much smaller patch and has the better timing profile. PTAL. https://github.com/llvm/llvm-project/pull/116719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [lld] [llvm] [RISCV] Make A implies Zaamo and Zalrsc (PR #116907)

2024-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-mc Author: Jim Lin (tclin914) Changes Ref: https://github.com/riscv/riscv-isa-manual/blob/main/src/a-st-ext.adoc. --- Patch is 20.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-proj

[clang-tools-extra] [clang-tidy] New option `CompilationArgsToRemoveRegex` to remove arguments from the command line (PR #111453)

2024-11-19 Thread via cfe-commits
=?utf-8?q?F=C3=A9lix-Antoine?= Constantin Message-ID: In-Reply-To: emmett2020 wrote: This would be a big improvement for users who using another compiler. Thank you. https://github.com/llvm/llvm-project/pull/111453 ___ cfe-commits mailing list cfe-c

[clang] [llvm] [LoongArch] Support LA V1.1 feature that div.w[u] and mod.w[u] instructions with inputs not signed-extended. (PR #116764)

2024-11-19 Thread via cfe-commits
@@ -118,6 +118,12 @@ def FeatureLAM_BH "Support amswap[_db].{b/h} and amadd[_db].{b/h} instructions.">; def HasLAM_BH : Predicate<"Subtarget->hasLAM_BH()">; +// Assume div.w[u] and mod.w[u] can handle inputs that are not sign-extended. +def FeatureDiv3

[clang] [llvm] [LoongArch] Support LA V1.1 feature that div.w[u] and mod.w[u] instructions with inputs not signed-extended. (PR #116764)

2024-11-19 Thread Lu Weining via cfe-commits
SixWeining wrote: The expectation is at least for this test: ``` define i32 @test(i32 %a, i32 %b) { %c = udiv i32 %a, %b ret i32 %c } ``` ### without this feature ``` addi.w $a1, $a1, 0 addi.w $a0, $a0, 0 div.wu $a0, $a0, $a1 ret ``` ### with this feature

[clang] [CodeGen] Do not emit call site attributes for LLVM intrinsics. (PR #116881)

2024-11-19 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Accessing intrinsics using `asm` is not a documented feature; it's an unintended result of the name clash between functions and LLVM intrinsics. And I'm a little hesitant about making it a real feature; there are other calling convention issues, and IR changes can very ea

[clang] [llvm] [LoongArch] Support LA V1.1 feature that div.w[u] and mod.w[u] instructions with inputs not signed-extended. (PR #116764)

2024-11-19 Thread via cfe-commits
tangaac wrote: the original test is from gcc ```cpp int divw(long a, long b) { return (int)a / (int)b; } unsigned int divwu(long a, long b) { return (unsigned int)a / (unsigned int)b; } int modw(long a, long b) { return (int)a % (int)b; } unsigned int modwu(long a, long b) { ret

[clang] [clang-format] Stop crashing on slightly off Verilog module headers (PR #116000)

2024-11-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/6584 Here is the relevant piece of the

[clang] [llvm] [LoongArch] Support LA V1.1 feature that div.w[u] and mod.w[u] instructions with inputs not signed-extended. (PR #116764)

2024-11-19 Thread via cfe-commits
https://github.com/tangaac updated https://github.com/llvm/llvm-project/pull/116764 >From 78e214321a273636f7cf4838f0b1ce04ba21d445 Mon Sep 17 00:00:00 2001 From: tangaac Date: Tue, 19 Nov 2024 15:04:29 +0800 Subject: [PATCH 1/2] [LoongArch] Support LA V1.1 feature that div.w[u] and mod.w[u] in

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-19 Thread Campbell Barton via cfe-commits
ideasman42 wrote: > So IIUC, you are proposing a create an entirely seperate project for > "vc-diff-lines" or something like that then making that a dependency for for > `clang-format`? Is that correct? I would not depend on it - instead, it would be loosely coupled - if `clang-format-vc-diff

[clang] Clarify use of contractions in diagnostic messages (PR #116803)

2024-11-19 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > could there be tools that try to parse the messages > > Hmm, I think we have other formats that are better suited for that (don’t we > have a flag that makes us print JSON diagnostics?), so I’d _hope_ that no-one > tries to just parse the diagnostics from the terminal,

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-19 Thread via cfe-commits
goldsteinn wrote: > _Suggesting a fairly large change to this PR, although it's quite > opinionated._ > > If I were maintaining `clang-format.el` I'd split out the logic for > generating a list of changes into it's own package. > > Exactly how this is done is not be so important... it could f

[clang] [llvm] [SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-11-19 Thread Eli Friedman via cfe-commits
@@ -4619,6 +4619,12 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // Buffer is a void**. Address Buf = EmitPointerWithAlignment(E->getArg(0)); +if (getTarget().getTriple().getArch() == llvm::Triple::systemz) { + // Call L

[clang] [llvm] [LoongArch] Support LA V1.1 feature ld-seq-sa that don't generate dbar 0x700. (PR #116762)

2024-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch Author: None (tangaac) Changes Two options for clang -mld-seq-sa: Do not generate load-load barrier instructions (dbar 0x700) -mno-ld-seq-sa: Generate load-load barrier instructions (dbar 0x700) The default is

[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #116744)

2024-11-19 Thread Vladimir Vereschaka via cfe-commits
https://github.com/vvereschaka updated https://github.com/llvm/llvm-project/pull/116744 >From f01a685000a87d1e7fa7a74ee644aa94a6d8198c Mon Sep 17 00:00:00 2001 From: Vladimir Vereschaka Date: Tue, 19 Nov 2024 11:32:18 -0800 Subject: [PATCH] [CMake] Update CMake cache file for the ARM/Aarch64 cr

[clang] [CodeGen] Do not emit call site attributes for LLVM intrinsics. (PR #116881)

2024-11-19 Thread Michele Scandale via cfe-commits
https://github.com/michele-scandale closed https://github.com/llvm/llvm-project/pull/116881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Do not emit call site attributes for LLVM intrinsics. (PR #116881)

2024-11-19 Thread Michele Scandale via cfe-commits
michele-scandale wrote: > Anything we do to make this work better risks being interpreted as treating > this as somehow supported, which it absolutely is not. Alright. I guess I'll close this PR. https://github.com/llvm/llvm-project/pull/116881 ___ c

[clang-tools-extra] [clangd] Fix erroneous qualification of template type parameters (PR #116821)

2024-11-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Stop crashing on slightly off Verilog module headers (PR #116000)

2024-11-19 Thread via cfe-commits
https://github.com/sstwcw closed https://github.com/llvm/llvm-project/pull/116000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0ff8b79 - [clang-format] Stop crashing on slightly off Verilog module headers (#116000)

2024-11-19 Thread via cfe-commits
Author: sstwcw Date: 2024-11-20T04:49:58Z New Revision: 0ff8b79160509b25fd913ffa320b9dab5b87b55e URL: https://github.com/llvm/llvm-project/commit/0ff8b79160509b25fd913ffa320b9dab5b87b55e DIFF: https://github.com/llvm/llvm-project/commit/0ff8b79160509b25fd913ffa320b9dab5b87b55e.diff LOG: [clang

[clang] [clang-format] Stop crashing on slightly off Verilog module headers (PR #116000)

2024-11-19 Thread via cfe-commits
https://github.com/sstwcw updated https://github.com/llvm/llvm-project/pull/116000 >From 0ff8b79160509b25fd913ffa320b9dab5b87b55e Mon Sep 17 00:00:00 2001 From: sstwcw Date: Wed, 13 Nov 2024 05:37:04 + Subject: [PATCH] [clang-format] Stop crashing on slightly off Verilog module headers (#1

[clang] fix(clang/**.py): fix invalid escape sequences (PR #94029)

2024-11-19 Thread Eisuke Kawashima via cfe-commits
https://github.com/e-kwsm updated https://github.com/llvm/llvm-project/pull/94029 >From 8ebfa30beff75a80601ae88c878beffe31a3f310 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Sat, 11 May 2024 02:39:21 +0900 Subject: [PATCH] fix(clang/**.py): fix invalid escape sequences --- clang/docs

[clang] [AArch64ABI] Don't pass small types with padding as wide ints. (WIP) (PR #116615)

2024-11-19 Thread Ber Clausen via cfe-commits
bar wrote: @fhahn I'd appreciate if you would't use my handle to document the code, thanks! https://github.com/llvm/llvm-project/pull/116615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [LoongArch] Support LA V1.1 feature that div.w[u] and mod.w[u] instructions with inputs not signed-extended. (PR #116764)

2024-11-19 Thread Lu Weining via cfe-commits
@@ -118,6 +118,12 @@ def FeatureLAM_BH "Support amswap[_db].{b/h} and amadd[_db].{b/h} instructions.">; def HasLAM_BH : Predicate<"Subtarget->hasLAM_BH()">; +// Assume div.w[u] and mod.w[u] can handle inputs that are not sign-extended. +def FeatureDiv3

[clang] [Clang] [NFC] Migrate visitors in AST (PR #116823)

2024-11-19 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/116823 This pr migrates most of the remaining AST visitors all across Clang to use `DynamicRecursiveASTVisitor`. This is part of an ongoing refactor. For more context, see #110040, #93462. >From 2b29d679a6c232387bd7

[clang] [Clang] eliminate shadowing warnings for parameters using deducing this (PR #114813)

2024-11-19 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/114813 >From 91ff2b4226110ea35c78f0f1b6ff89b4bec2c788 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 4 Nov 2024 17:38:46 +0200 Subject: [PATCH 1/3] [Clang] eliminate shadowing warnings for parameters using d

[clang] [Clang] skip warnings for constructors marked with the [[noreturn]] attribute (PR #115558)

2024-11-19 Thread via cfe-commits
@@ -555,6 +555,8 @@ Improvements to Clang's diagnostics getS(); // Now diagnoses "Reason 2", previously diagnoses "Reason 1" } +- Clang now omits warnings for constructors marked with the ``[[noreturn]]`` attribute (#GH63009). Sirraide wrote: ```su

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-19 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: @tstellar, seems like we both overlooked the `if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")`. Any objections to relanding the patch with that additional condition? https://github.com/llvm/llvm-project/pull/116556 ___ cfe-commits ma

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-19 Thread Campbell Barton via cfe-commits
ideasman42 wrote: _Suggesting a fairly large change to this PR, although it's quite opinionated._ If I were maintaining `clang-format.el` I'd split out the logic for generating a list of changes into it's own package. Exactly how this is done is not be so important... it could for example supp

[clang] [CodeGen] Do not emit call site attributes for LLVM intrinsics. (PR #116881)

2024-11-19 Thread John McCall via cfe-commits
rjmccall wrote: Yeah, that's my take as well. Anything we do to make this work better risks being interpreted as treating this as somehow supported, which it absolutely is not. https://github.com/llvm/llvm-project/pull/116881 ___ cfe-commits mailing

[clang] [llvm] [SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-11-19 Thread Ulrich Weigand via cfe-commits
@@ -940,7 +947,242 @@ bool SystemZTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT, return SystemZVectorConstantInfo(Imm).isVectorConstantLegal(Subtarget); } -/// Returns true if stack probing through inline assembly is requested. + +MachineBasicBlock * +SystemZTarge

[clang] [analyzer][Solver] Early return if sym is concrete on assuming (PR #115579)

2024-11-19 Thread Ding Fei via cfe-commits
danix800 wrote: > Thank you for your dedication. What are your plans? Do you plan to continue > pushing this? > > Btw why did this test only fail on Windows? I'll further investigate if it's possilbe to do similar improvement on the solver in other ways. https://github.com/llvm/llvm-project/

[clang] [lld] [llvm] [RISCV] Make A implies Zaamo and Zalrsc (PR #116907)

2024-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld-elf Author: Jim Lin (tclin914) Changes Ref: https://github.com/riscv/riscv-isa-manual/blob/main/src/a-st-ext.adoc. --- Patch is 20.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/116907.diff 7 Files

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread via cfe-commits
https://github.com/Sirraide commented: The main thing I’m concerned about here is that I feel like there ought to be a better way of doing this than checking for and disallowing it in every place where we can have a subexpression in C. CC @AaronBallman for opinions on this. Also, if we’re doi

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-11-19 Thread Michael Toguchi via cfe-commits
@@ -0,0 +1,183 @@ +//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- C++ -*-===// +// +// 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] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread via cfe-commits
Sirraide wrote: > Could you point to a place in the code where it creates a placeholder? I mean, e.g. `CheckPointerToMemberOperands()` can return `BoundMemberTy` as the type of a `.*` expression, and `CreateBuiltinMatrixSubscriptExpr()` creates a `MatrixSubscriptExpr` with type `IncompleteMatr

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/1642 Here is the releva

[clang] [lld] [llvm] [RISCV] Make A implies Zaamo and Zalrsc (PR #116907)

2024-11-19 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [RISCV] Make A implies Zaamo and Zalrsc (PR #116907)

2024-11-19 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/116907 Ref: https://github.com/riscv/riscv-isa-manual/blob/main/src/a-st-ext.adoc. >From 91aea6122d192d72e078408366b46b3dab5a37a9 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Wed, 20 Nov 2024 10:31:58 +0800 Subject:

[clang] [compiler-rt] [llvm] [XRay] Add `-fxray-default-options` to pass build-time defined XRay options (PR #116878)

2024-11-19 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave created https://github.com/llvm/llvm-project/pull/116878 This flag specifies XRay options that will automatically be applied to the instrumented binaries during run-time even without setting `XRAY_OPTIONS`. This is useful in cases where setting the `XRAY_OPTIONS`

[clang] [clang][CodeGen][SPIRV] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_size`. (PR #116820)

2024-11-19 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/116820 >From c5efdd24c0c889e26e3b00865780970ca5ed1f4c Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 19 Nov 2024 14:55:25 + Subject: [PATCH 1/2] Translate `amdgpu_flat_work_group_size` into `reqd_work_group_

[clang] Define a diagnostic group for missing variadic macro arguments (PR #116855)

2024-11-19 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/116855 Make the new diagnostic group a subgroup of the following diagnostic groups: -Wpre-c23-compat -Wgnu-zero-variadic-macro-arguments -Wc++20-extensions -Wc23-extensions This change is needed as 5231005193afb8db01

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

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

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread via cfe-commits
@@ -6205,10 +6212,24 @@ bool Sema::CheckArgsForPlaceholders(MultiExprArg args) { for (size_t i = 0, e = args.size(); i != e; i++) { if (isPlaceholderToRemoveAsArg(args[i]->getType())) { ExprResult result = CheckPlaceholderExpr(args[i]); - if (result.isInvalid()

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

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

[clang] b246d5f - Disable symbol versions for clang-cpp also with MSVC

2024-11-19 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2024-11-20T03:43:55+01:00 New Revision: b246d5f0556114d9a454bf2471f9c0577f1dce2f URL: https://github.com/llvm/llvm-project/commit/b246d5f0556114d9a454bf2471f9c0577f1dce2f DIFF: https://github.com/llvm/llvm-project/commit/b246d5f0556114d9a454bf2471f9c0577f1dce2f.diff

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-19 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Went with a version that resembles the following condition and is a bit shorter. https://github.com/llvm/llvm-project/pull/116556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] 461e58e - Introduce symbol versioning for clang-cpp (#116556)

2024-11-19 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2024-11-20T03:28:54+01:00 New Revision: 461e58e75dc3e2a0d6e0448c1ebcb8bd14e3d65c URL: https://github.com/llvm/llvm-project/commit/461e58e75dc3e2a0d6e0448c1ebcb8bd14e3d65c DIFF: https://github.com/llvm/llvm-project/commit/461e58e75dc3e2a0d6e0448c1ebcb8bd14e3d65c.diff

[clang] Clarify use of contractions in diagnostic messages (PR #116803)

2024-11-19 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. I think that’s fine, yeah https://github.com/llvm/llvm-project/pull/116803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Jonas Paulsson via cfe-commits
@@ -255,4 +255,9 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) { } setLibcallName(RTLIB::MULO_I128, nullptr); } + + if (TT.isSystemZ()) { +setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2"); +setLibcallName(RTLIB::FPEXT_F16_F32, "__extendhfs

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Trevor Gross via cfe-commits
@@ -513,11 +514,37 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM, } // Handle floating-point types. + // Promote all f16 operations to float, with some exceptions below. + for (unsigned Opc = 0; Opc < ISD::BUILTIN_OP_END; ++Opc) +setOperati

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Trevor Gross via cfe-commits
@@ -255,4 +255,9 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) { } setLibcallName(RTLIB::MULO_I128, nullptr); } + + if (TT.isSystemZ()) { +setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2"); +setLibcallName(RTLIB::FPEXT_F16_F32, "__extendhfs

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-19 Thread Tom Stellard via cfe-commits
tstellar wrote: @aaronpuchert That looks fine to me. https://github.com/llvm/llvm-project/pull/116556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Trevor Gross via cfe-commits
@@ -255,4 +255,9 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) { } setLibcallName(RTLIB::MULO_I128, nullptr); } + + if (TT.isSystemZ()) { +setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2"); +setLibcallName(RTLIB::FPEXT_F16_F32, "__extendhfs

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-19 Thread Farzon Lotfi via cfe-commits
@@ -4744,6 +4744,12 @@ def HLSLAny : LangBuiltin<"HLSL_LANG"> { let Prototype = "bool(...)"; } +def HLSLWaveActiveAnyTrue : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_wave_active_any_true"]; + let Attributes = [NoThrow, Const]; + let Prototype = "bool(b

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-19 Thread Michael Buch via cfe-commits
Michael137 wrote: Looks like this broke macOS CI: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/7705/execution/node/45/log/ ``` ld: unknown options: --version-script clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` Could you take a look/rev

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: Updated per review. - strict fp-round / fp-extend added with tests. - math functions like fsin promoted instead of expanded to non-existing fsinh. - conversion functions from e.g. f16 -> f64 used instead of separate steps. - __fp16 argument/return values removed (and tests in sy

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Jonas Paulsson via cfe-commits
@@ -91,11 +91,28 @@ class LLVM_LIBRARY_VISIBILITY SystemZTargetInfo : public TargetInfo { "-v128:64-a:8:16-n32:64"); } MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 128; + +// True if the backend supports operations on the half LLVM IR type.

[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #116744)

2024-11-19 Thread Vladimir Vereschaka via cfe-commits
https://github.com/vvereschaka closed https://github.com/llvm/llvm-project/pull/116744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 50e38cc - [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (#116744)

2024-11-19 Thread via cfe-commits
Author: Vladimir Vereschaka Date: 2024-11-19T17:42:26-08:00 New Revision: 50e38cc85663de27cfed59b8f09edf3437fbf164 URL: https://github.com/llvm/llvm-project/commit/50e38cc85663de27cfed59b8f09edf3437fbf164 DIFF: https://github.com/llvm/llvm-project/commit/50e38cc85663de27cfed59b8f09edf3437fbf164

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/3] [Clang] Improve Sema diagnostic performance for __builtin

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

2024-11-19 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @ahmedbougacha @ahatanak Please let me know if you have any objections on this. @MaskRay Would be glad to see your feedback as well. See also https://github.com/llvm/llvm-project/pull/113152#issuecomment-2486394507 https://github.com/llvm/llvm-project/pull/113149 ___

[clang] [llvm] [SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-11-19 Thread Ulrich Weigand via cfe-commits
@@ -6292,6 +6534,10 @@ SDValue SystemZTargetLowering::LowerOperation(SDValue Op, return lowerGET_ROUNDING(Op, DAG); case ISD::READCYCLECOUNTER: return lowerREADCYCLECOUNTER(Op, DAG); + case ISD::EH_SJLJ_SETJMP: + case ISD::EH_SJLJ_LONGJMP: +return Op; --

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-11-19 Thread Michael Toguchi via cfe-commits
@@ -0,0 +1,183 @@ +//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- C++ -*-===// +// +// 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] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/116719 >From 2dcf18163de2ccce959f46bf82df1fa40e3fd1fc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Nov 2024 15:41:48 -0800 Subject: [PATCH 1/2] [Clang] Improve Sema diagnostic performance for __builtin

[clang] [clang] constexpr built-in reduce and function. (PR #116822)

2024-11-19 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/116822 >From 5923208aebdaae2a7a121a1378a911b7f13f1f3e Mon Sep 17 00:00:00 2001 From: c8ef Date: Tue, 19 Nov 2024 23:07:43 +0800 Subject: [PATCH 1/2] constexpr reduce and --- clang/docs/ReleaseNotes.rst |

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-19 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Same for `if (MSVC)`. So let's make this: ```cmake if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT MSVC AND NOT LLVM_LINKER_IS_SOLARISLD AND NOT MINGW) ``` https://github.com/llvm/llvm-project/pull/116556 ___ cfe-commits mai

[clang] Add a testcase for riscv64-linux-android triple (PR #116892)

2024-11-19 Thread via cfe-commits
https://github.com/hiraditya updated https://github.com/llvm/llvm-project/pull/116892 >From 264af861192f1af7b391d061c4bf52711091b5be Mon Sep 17 00:00:00 2001 From: AdityaK Date: Tue, 19 Nov 2024 15:54:16 -0800 Subject: [PATCH] Add a testcase for riscv64-linux-android triple --- clang/test/Dri

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

2024-11-19 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse 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] Clarify use of contractions in diagnostic messages (PR #116803)

2024-11-19 Thread via cfe-commits
Sirraide wrote: I don’t have a very strong opinion on this if the consensus is that this is a change for the better, but as someone with a background in linguistics, I’d argue that this seems like a weird thing to discourage—I don’t think the single quote is really distracting at all if it occ

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-19 Thread Shubham Sandeep Rastogi via cfe-commits
rastogishubham wrote: I have reverted the patch with 673b5dd380e8457c887d5b321195d81ea90f134d https://github.com/llvm/llvm-project/pull/116556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] 673b5dd - Revert "Introduce symbol versioning for clang-cpp (#116556)"

2024-11-19 Thread Shubham Sandeep Rastogi via cfe-commits
Author: Shubham Sandeep Rastogi Date: 2024-11-19T16:53:21-08:00 New Revision: 673b5dd380e8457c887d5b321195d81ea90f134d URL: https://github.com/llvm/llvm-project/commit/673b5dd380e8457c887d5b321195d81ea90f134d DIFF: https://github.com/llvm/llvm-project/commit/673b5dd380e8457c887d5b321195d81ea90f

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-19 Thread Shubham Sandeep Rastogi via cfe-commits
rastogishubham wrote: Hi this patch has broken the greendragon llvm bot. Link to failed build: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/15566/ ``` ld: unknown options: --version-script clang: error: linker command failed with exit code 1 (use -v to see invocation) `

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via cfe-commits
@@ -14690,6 +14690,17 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) { } } + // The result of __builtin_counted_by_ref cannot be assigned to a variable. + // It allows leaking and modification of bounds safety information. + if (const auto *CE = dyn_cast_if_present

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via cfe-commits
@@ -755,6 +755,7 @@ static ExprResult BuiltinDumpStruct(Sema &S, CallExpr *TheCall) { case BuiltinType::PseudoObject: case BuiltinType::UnknownAny: case BuiltinType::BuiltinFn: +case BuiltinType::BuiltinCountedByRef: bwendling wrote: Then shou

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-19 Thread Bill Wendling via cfe-commits
bwendling wrote: > Hmm, I don’t think this is the right way of going about it—copy-pasting the > check across 6 or so different places seems like it’s missing the point of > using a placeholder in the first place. Could you point to a place in the code where it creates a placeholder? I'm unab

[clang] Clarify use of contractions in diagnostic messages (PR #116803)

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

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Jonas Paulsson via cfe-commits
https://github.com/JonPsson1 edited https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Bump RVV intrinsic to version 1.0 (PR #116597)

2024-11-19 Thread Camel Coder via cfe-commits
camel-cdr wrote: > Presumably that (rather terse) sentence in the specification is that even, > say, RV64GC can check the macro and include riscv_vector.h, so that it can > then do `__attribute__((__target__(...)))` and use it in certain functions? Yes, thats the idea, otherwise it would be im

[clang] [clang][UBSan] Make sure that the implicit-conversion group is compatible with minimal runtime (PR #114865)

2024-11-19 Thread Axel Lundberg via cfe-commits
Zonotora wrote: Will do https://github.com/llvm/llvm-project/pull/114865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
@@ -8719,6 +8719,18 @@ Attribute used by `clspv`_ (OpenCL-C to Vulkan SPIR-V compiler) to identify func }]; } +def NoTrivialAutoVarInitDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``__declspec(no_init_all)`` attribute disables the automatic i

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/116847 >From d14059d2d7cb529fc0315c2cb1fbe869ebaab58d Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Tue, 19 Nov 2024 09:34:51 -0800 Subject: [PATCH] [clang] Add support for __declspec(no_init_all)

[clang] [compiler-rt] [libcxx] [llvm] [libc++] Replace LIBCXX_ENABLE_STATIC_ABI_LIBRARY & friends by a new LIBCXX_CXX_ABI choice (PR #112978)

2024-11-19 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/112978 >From e42db172b2397e6358dc60850e4c8b085c6bd4bf Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 13 May 2022 09:26:01 -0400 Subject: [PATCH 1/4] [libc++] Replace LIBCXX_ENABLE_STATIC_ABI_LIBRARY & friends

[clang] [clang][RISCV] Bump RVV intrinsic to version 1.0 (PR #116597)

2024-11-19 Thread Craig Topper via cfe-commits
topperc wrote: > > Considering the define is guarded behind `if > > (ISAInfo->hasExtension("zve32x"))`, this doesn't seem to implement: > > [riscv-non-isa/rvv-intrinsic-doc#382](https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/382) > > Presumably that (rather terse) sentence in the spec

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Jonas Paulsson via cfe-commits
@@ -6285,6 +6465,16 @@ SDValue SystemZTargetLowering::LowerOperation(SDValue Op, return lowerAddrSpaceCast(Op, DAG); case ISD::ROTL: return lowerShift(Op, DAG, SystemZISD::VROTL_BY_SCALAR); + case ISD::FP_EXTEND: +//case ISD::STRICT_FP_EXTEND: JonPss

[clang] [clang][ExprConst] Reject field access with nullptr base (PR #113885)

2024-11-19 Thread Richard Smith via cfe-commits
zygoloid wrote: As mentioned in the comment thread, I'd prefer to see this addressed by reversing the order in which we call `addDecl` versus add an offset. While it's a corner case, I think this change would cause us to start rejecting things like [this example](https://godbolt.org/z/5Pae6Ghd

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Jonas Paulsson via cfe-commits
@@ -513,11 +514,37 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM, } // Handle floating-point types. + // Promote all f16 operations to float, with some exceptions below. + for (unsigned Opc = 0; Opc < ISD::BUILTIN_OP_END; ++Opc) +setOperati

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Jonas Paulsson via cfe-commits
@@ -6108,6 +6160,133 @@ static SDValue lowerAddrSpaceCast(SDValue Op, SelectionDAG &DAG) { return Op; } +SDValue SystemZTargetLowering::LowerFP_EXTEND(SDValue Op, + SelectionDAG &DAG) const { + bool IsStrict = Op->isStrictFPOpco

[clang] Add a testcase for riscv64-linux-android triple (PR #116892)

2024-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: AdityaK (hiraditya) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/116892.diff 1 Files Affected: - (modified) clang/test/Driver/android-ndk-standalone.cpp (+16) ``diff diff

[clang] Add a testcase for riscv64-linux-android triple (PR #116892)

2024-11-19 Thread via cfe-commits
https://github.com/hiraditya created https://github.com/llvm/llvm-project/pull/116892 None >From c53b4e4f5bba3774838cb5dd49500357b9e0233b Mon Sep 17 00:00:00 2001 From: AdityaK Date: Tue, 19 Nov 2024 15:54:16 -0800 Subject: [PATCH] Add a testcase for riscv64-linux-android triple --- clang/te

[clang] [clang][SME] Ignore flatten for callees with mismatched streaming attributes (PR #116391)

2024-11-19 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Do we really need to do this in the frontend? The inliner itself should be doing safety checks. https://github.com/llvm/llvm-project/pull/116391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-19 Thread Jonas Paulsson via cfe-commits
@@ -6108,6 +6160,133 @@ static SDValue lowerAddrSpaceCast(SDValue Op, SelectionDAG &DAG) { return Op; } +SDValue SystemZTargetLowering::LowerFP_EXTEND(SDValue Op, + SelectionDAG &DAG) const { + bool IsStrict = Op->isStrictFPOpco

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

2024-11-19 Thread Haojian Wu via cfe-commits
@@ -32,6 +32,21 @@ void test_invalid_call(int s) { int var = some_func(undef1); } +int some_func2(int a, int b); +void test_invalid_call_2() { + // CHECK: `-RecoveryExpr {{.*}} 'int' contains-errors + // CHECK-NEXT: |-UnresolvedLookupExpr {{.*}} '' lvalue (ADL) = 'some_

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Eli Friedman via cfe-commits
@@ -8719,6 +8719,18 @@ Attribute used by `clspv`_ (OpenCL-C to Vulkan SPIR-V compiler) to identify func }]; } +def NoTrivialAutoVarInitDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``__declspec(no_init_all)`` attribute disables the automatic i

  1   2   3   4   5   >