[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-03-08 Thread via cfe-commits
Sirraide wrote: Yeah, I agree; I’ll wait a bit to see if Aaron has anything to say about it and merge this otherwise; once that’s done, I’ll add `[[omp::assume]]` in a separate pr and open an issue to discuss what to do w/ the other spellings. https://github.com/llvm/llvm-project/pull/81014 __

[clang] 9405d5a - [DFSan] Add missing documentation for -dfsan-reaches-function-callbacks. (#84218)

2024-03-08 Thread via cfe-commits
Author: Andrew Browne Date: 2024-03-08T11:04:04-08:00 New Revision: 9405d5af65853ac548cce2656497195010db1d86 URL: https://github.com/llvm/llvm-project/commit/9405d5af65853ac548cce2656497195010db1d86 DIFF: https://github.com/llvm/llvm-project/commit/9405d5af65853ac548cce2656497195010db1d86.diff

[clang] [DFSan] Add missing documentation for -dfsan-reaches-function-callbacks. (PR #84218)

2024-03-08 Thread Andrew Browne via cfe-commits
https://github.com/browneee closed https://github.com/llvm/llvm-project/pull/84218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add diagnostic for enabling 16 bit types (PR #84537)

2024-03-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/84537 The -enable-16bit-types option was previously added without checking for a couple essential conditions. First, the target shader model must be greater than 6.2, and secondly, the hlsl version must be after HLSL

[clang] [HLSL] Add diagnostic for enabling 16 bit types (PR #84537)

2024-03-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/84537 >From 8205c6894a4c1deeeb28c2520d16a56c3fcf21ea Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 8 Mar 2024 11:03:37 -0800 Subject: [PATCH] add check for enable 16 bit types --- clang/include/clang/Basi

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread via cfe-commits
@@ -31,6 +31,9 @@ def SDT_BPFMEMCPY : SDTypeProfile<0, 4, [SDTCisVT<0, i64>, SDTCisVT<1, i64>, SDTCisVT<2, i64>, SDTCisVT<3, i64>]

[clang] [Driver] Allow -fbasic-block-address-map for AArch64 ELF (PR #82662)

2024-03-08 Thread Daniel Thornburgh via cfe-commits
mysterymath wrote: Hi, we've narrowed down a LLDB test failure on Fuchsia's AArch64 builders to this change: https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-arm64/b8754880571862677073/overview There were only three likely culprits in the blamelist(this change, #8320

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-08 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > @jrtc27 does this look better now? Yes; thanks https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-08 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 dismissed https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread via cfe-commits
@@ -0,0 +1,52 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 +; RUN: opt --bpf-check-and-opt-ir -S -mtriple=bpf-pc-linux < %s | FileCheck %s + +; Generated from the following C code: +; +; extern int __uptr *magic1(); +; ex

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread via cfe-commits
@@ -0,0 +1,92 @@ +//=== BPFIRPeephole.cpp - IR Peephole Transformation --===// eddyz87 wrote: My bad. Thank you for taking a look at this MR, will push updates with fixes soon. https://github.com/llvm/llvm-project/pull/84410

[clang] [Driver] Allow -fbasic-block-address-map for AArch64 ELF (PR #82662)

2024-03-08 Thread Daniel Thornburgh via cfe-commits
mysterymath wrote: I'm terribly sorry, this was the wrong change from the blamelist. NAR. https://github.com/llvm/llvm-project/pull/82662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-08 Thread Kees Cook via cfe-commits
kees wrote: > > I didn't do this because it seemed like this would change a lot of existing > > test cases > > Can you give some examples of tests that would fail? If we have tests > checking that these fail, then perhaps those tests should add > `-Werror=pedantic` so that they can continue t

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-08 Thread Nathan Sidwell via cfe-commits
@@ -394,33 +412,155 @@ void CGRecordLowering::accumulateFields() { : getStorageType(*Field), *Field)); ++Field; -} else { - ++Field; } } } -void -CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, -

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-03-08 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/78000 >From 3d2716ad6088f600c14d6ff724aa90453130a1f7 Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Mon, 18 Dec 2023 10:58:16 +0900 Subject: [PATCH 01/11] [BoundsSafety] Introduce CountAttributedType CountAttributedTy

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-08 Thread Nathan Sidwell via cfe-commits
@@ -394,33 +412,155 @@ void CGRecordLowering::accumulateFields() { : getStorageType(*Field), *Field)); ++Field; -} else { - ++Field; } } } -void -CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, -

[clang] [HLSL][docs] Document hlsl.h in the HLSL docs (PR #84081)

2024-03-08 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/84081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][docs] Document hlsl.h in the HLSL docs (PR #84081)

2024-03-08 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/84081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][docs] Document hlsl.h in the HLSL docs (PR #84081)

2024-03-08 Thread Damyan Pepper via cfe-commits
@@ -114,6 +114,44 @@ not re-targetable, we want to share the Clang CodeGen implementation for HLSL with other GPU graphics targets like SPIR-V and possibly other GPU and even CPU targets. +hlsl.h +-- + +HLSL has an extensive library of functionality. This is similar to Op

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-08 Thread Nathan Sidwell via cfe-commits
urnathan wrote: This update * moves the creation and installation of the BitFieldAccessUnit objects into CGRecordLowering. * adds aarch64 and arm darwin target tests, as those have different layout rules (let me know if I've missed something here). * Simplifies the checking of barriers -- an e

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-08 Thread Joshua Cranmer via cfe-commits
@@ -982,13 +1024,18 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo &Op) { llvm::Value *OrigLHSi = LHSi; if (!LHSi) LHSi = llvm::Constant::getNullValue(RHSi->getType()); -if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Fortran) +Qua

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-08 Thread Joshua Cranmer via cfe-commits
@@ -283,9 +283,48 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo &Op); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-03-08 Thread Joshua Cranmer via cfe-commits
@@ -1847,19 +1847,50 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. +.. option:: -fcomplex-arithmetic=: + + This option specifies the impl

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-08 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/84526 >From ad83fd46be2e1587a6cb0098467e18dc38612517 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 7 Mar 2024 20:48:46 -0500 Subject: [PATCH 1/2] [DXIL] exp, any, lerp, & rcp Intrinsic Lowering This change im

[clang] [llvm] [BPF] add cast_{user,kern} instructions (PR #79902)

2024-03-08 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/79902 >From 870ed843d677fc667c1190ada44d68a0c532efe6 Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Fri, 26 Jan 2024 04:18:32 +0200 Subject: [PATCH 1/4] [BPF] Add addr_space_cast BPF instruction This commit aim

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-08 Thread Xiang Li via cfe-commits
@@ -226,6 +226,47 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch, A->claim(); continue; } +if (A->getOption().getID() == options::OPT_dxc_hlsl_version) { + // Translate -HV into -std for llvm + // depending on the

[clang] [APINotes] Fix failing tests after a PCM logic change (PR #84556)

2024-03-08 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan created https://github.com/llvm/llvm-project/pull/84556 This fixes tests that are going to be upstreamed in the near future. Currently they are failing downstream in the Apple open source fork. Failing tests Clang :: APINotes/retain-count-convention.m Clang ::

[clang] [APINotes] Fix failing tests after a PCM logic change (PR #84556)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Egor Zhdan (egorzhdan) Changes This fixes tests that are going to be upstreamed in the near future. Currently they are failing downstream in the Apple open source fork. Failing tests Clang :: APINotes/retain-count-convention.m Clang :

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/84410 >From 0575ca506badd58d870ce03b1f2e26e7a3d6168b Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Fri, 26 Jan 2024 04:18:32 +0200 Subject: [PATCH 1/4] [BPF] Add addr_space_cast BPF instruction This commit aim

[clang] [llvm] [BPF] add cast_{user,kern} instructions (PR #79902)

2024-03-08 Thread via cfe-commits
https://github.com/eddyz87 closed https://github.com/llvm/llvm-project/pull/79902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] add cast_{user,kern} instructions (PR #79902)

2024-03-08 Thread via cfe-commits
eddyz87 wrote: Closing this in favor of #84410 https://github.com/llvm/llvm-project/pull/79902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread via cfe-commits
https://github.com/eddyz87 edited https://github.com/llvm/llvm-project/pull/84410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread via cfe-commits
https://github.com/eddyz87 approved this pull request. https://github.com/llvm/llvm-project/pull/84410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] RPCLaneSize (PR #84557)

2024-03-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/84557 - [HIP] Make the new driver bundle outputs for device-only - [libc][NFCI] Remove lane size template argument on RPC server >From 99a769ec7ffaa7728847fdf2f67a1be11ce98f2b Mon Sep 17 00:00:00 2001 From: Joseph Hub

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-08 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > Should I update this PR or create a new one? Consider updating this one. Worst case, if my fellow reviewers disagree with my suggestion, there's always `git reflog` for getting back to the initial version. > GCC does not support this in either! Do you have a bug on

[clang] [libc] RPCLaneSize (PR #84557)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes - [HIP] Make the new driver bundle outputs for device-only - [libc][NFCI] Remove lane size template argument on RPC server --- Patch is 25.25 KiB, truncated to 20.00 KiB below, full version: https:/

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-08 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > I think you need to run `clang/docs/tools/dump_format_help.py`. https://github.com/llvm/llvm-project/pull/84346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [libc] [libc][NFCI] Remove lane size template argument on RPC server (PR #84557)

2024-03-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/84557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [libc][NFCI] Remove lane size template argument on RPC server (PR #84557)

2024-03-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/84557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-03-08 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: Apologies for the delay! I looked into this performance hit, and it seems largely expected to me: the compiler spends extra time checking if there is an apinotes file for a given clang module with the notes for the declarations that are being processed. We can consider adding

[clang] 83789ff - [TBAA] Add bail-out to skip tbaa generation to getTBAAStructInfo. (#84386)

2024-03-08 Thread via cfe-commits
Author: Florian Hahn Date: 2024-03-08T20:43:35Z New Revision: 83789ffbd857bb78b69d6e54560310ff2d347f04 URL: https://github.com/llvm/llvm-project/commit/83789ffbd857bb78b69d6e54560310ff2d347f04 DIFF: https://github.com/llvm/llvm-project/commit/83789ffbd857bb78b69d6e54560310ff2d347f04.diff LOG:

[clang] [TBAA] Add bail-out to skip tbaa generation to getTBAAStructInfo. (PR #84386)

2024-03-08 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/84386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-08 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/83774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-08 Thread Louis Dionne via cfe-commits
@@ -2912,16 +2912,70 @@ static bool sdkSupportsBuiltinModules(const Darwin::DarwinPlatformKind &TargetPl } } -void Darwin::addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args, -

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-08 Thread Louis Dionne via cfe-commits
https://github.com/ldionne commented: The version map seems correct to me. I have a comment about z/OS appearing in a place it shouldn't but apart from that LGTM. Heads up @ahatanak you probably want to have a quick look as well since you did a lot of work around aligned allocation on Apple pl

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-08 Thread Louis Dionne via cfe-commits
@@ -2912,16 +2912,70 @@ static bool sdkSupportsBuiltinModules(const Darwin::DarwinPlatformKind &TargetPl } } -void Darwin::addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args, -

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-08 Thread Kees Cook via cfe-commits
kees wrote: GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53548 Clang: https://github.com/llvm/llvm-project/issues/84565 https://github.com/llvm/llvm-project/pull/84428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 commented: In terms of getting this landed and tested, I wonder which path we should take: 1. Land this now, without tests, then update emscripten then come back and flip the default, at which point the existing tests will get updated. 2. Duplicate/update the the exis

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/83938 >From 7453ffdea39c624221c9696394bbd47be7eec662 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Mon, 4 Mar 2024 13:42:02 -0800 Subject: [PATCH 1/6] first try --- clang/include/clang/Driver/Options.td | 4 ++

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-08 Thread Joshua Batista via cfe-commits
@@ -226,6 +226,47 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch, A->claim(); continue; } +if (A->getOption().getID() == options::OPT_dxc_hlsl_version) { + // Translate -HV into -std for llvm + // depending on the

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/84489 >From 265db5ee772772bef4099cc97b69995cfa67b3f2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 8 Mar 2024 22:15:20 +0800 Subject: [PATCH 1/2] [clang-tidy]avoid bugprone-unused-return-value false posit

[clang] [llvm] [HIP] add --offload-compression-level= option (PR #83605)

2024-03-08 Thread Yaxun Liu via cfe-commits
@@ -2863,3 +2863,18 @@ void tools::addOutlineAtomicsArgs(const Driver &D, const ToolChain &TC, CmdArgs.push_back("+outline-atomics"); } } + +void tools::addOffloadCompressArgs(const llvm::opt::ArgList &TCArgs, + llvm::opt::ArgStringList

[clang] Fix warning message when using -fno-cx-limited-range and -fno-cx-fort… (PR #84567)

2024-03-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/84567 …ran-rules. >From 28f355e0f30660593902165a885acc0182e197cc Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Fri, 8 Mar 2024 13:13:11 -0800 Subject: [PATCH] Fix warning message when using -fno-cx-limited

[clang] Fix warning message when using -fno-cx-limited-range/cx-fort… (PR #84567)

2024-03-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/84567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix warning message when using negative complex range options. (PR #84567)

2024-03-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/84567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Make the new driver bundle outputs for device-only (PR #84534)

2024-03-08 Thread Yaxun Liu via cfe-commits
@@ -4638,7 +4638,10 @@ Action *Driver::BuildOffloadingActions(Compilation &C, } } - if (offloadDeviceOnly()) + // All kinds exit now in device-only mode except for non-RDC mode HIP. yxsamliu wrote: I am wondering whether we should restrict this change

[clang] [HIP] Make the new driver bundle outputs for device-only (PR #84534)

2024-03-08 Thread Joseph Huber via cfe-commits
@@ -4638,7 +4638,10 @@ Action *Driver::BuildOffloadingActions(Compilation &C, } } - if (offloadDeviceOnly()) + // All kinds exit now in device-only mode except for non-RDC mode HIP. jhuber6 wrote: The old driver doesn't call this function at all, they

[clang] Fix warning message when using negative complex range options. (PR #84567)

2024-03-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/84567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix warning message when using negative complex range options. (PR #84567)

2024-03-08 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam ready_for_review https://github.com/llvm/llvm-project/pull/84567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix warning message when using negative complex range options. (PR #84567)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zahira Ammarguellat (zahiraam) Changes When `-fcx-no-limited-range` or` -fno-cx-fortran-rules` follows another complex range option on the command line, it will trigger a warning with empty message. `warning: overriding '-fcx-fortran-rules

[clang] [llvm] [HIP] add --offload-compression-level= option (PR #83605)

2024-03-08 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/83605 >From 906b23c5f8ef815b7727fe2bda852c33f0d9147b Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 1 Mar 2024 13:16:45 -0500 Subject: [PATCH] [HIP] add --offload-compression-level= option Added --offloa

[clang] [HIP] Make the new driver bundle outputs for device-only (PR #84534)

2024-03-08 Thread Joseph Huber via cfe-commits
@@ -4638,7 +4638,10 @@ Action *Driver::BuildOffloadingActions(Compilation &C, } } - if (offloadDeviceOnly()) + // All kinds exit now in device-only mode except for non-RDC mode HIP. jhuber6 wrote: Basically, the new driver does everything through `Bui

[clang] [llvm] [HIP] add --offload-compression-level= option (PR #83605)

2024-03-08 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/83605 >From c46a3ce625a34a497cd0b14631cb755b903e93d6 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 1 Mar 2024 13:16:45 -0500 Subject: [PATCH] [HIP] add --offload-compression-level= option Added --offloa

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Alex Crichton via cfe-commits
https://github.com/alexcrichton created https://github.com/llvm/llvm-project/pull/84569 This commit changes the default linker in the WebAssembly toolchain for the `wasm32-wasip2` target. This target is being added to the WebAssembly/wasi-sdk and WebAssembly/wasi-libc projects to target the Co

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

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

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Alex Crichton (alexcrichton) Changes This commit changes the default linker in the WebAssembly toolchain for the `wasm32-wasip2` target. This target is being added to the WebAssembly/wasi-sdk and WebAssembly/wasi-libc projects to t

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

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

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

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

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

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

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

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

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

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

[clang] [Clang] [Sema] Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

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

[clang] [clang-fuzzer] Set the link language for dictionary (PR #84572)

2024-03-08 Thread Colin McEwan via cfe-commits
https://github.com/cme created https://github.com/llvm/llvm-project/pull/84572 clang-fuzzer-dictionary is a C-source tool so by default doesn't link with CMake's specified C++ libraries, which are needed for libclang. (This fixes issues building with C++ libraries other than the system default)

[clang] [clang-fuzzer] Set the link language for dictionary (PR #84572)

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

[clang] [clang-fuzzer] Set the link language for dictionary (PR #84572)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Colin McEwan (cme) Changes clang-fuzzer-dictionary is a C-source tool so by default doesn't link with CMake's specified C++ libraries, which are needed for libclang. (This fixes issues building with C++ libraries other than the system def

[clang] [clang-tools-extra] [llvm] [llvm][Support] Add and use errnoAsErrorCode (PR #84423)

2024-03-08 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. Sounds OK to me. (though several other instances of system_category are touched in this patch - out of curiosity, how are those different from the one fixed case you called out in JSONTransport.cpp? Are the other uses of system_category

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-08 Thread Kees Cook via cfe-commits
https://github.com/kees updated https://github.com/llvm/llvm-project/pull/84428 >From eb5138b45fa450737600050ad8dabdcb27513d42 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 7 Mar 2024 17:03:09 -0800 Subject: [PATCH] [Clang][Sema]: Allow flexible arrays in unions and alone in structs GNU

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-08 Thread Kees Cook via cfe-commits
https://github.com/kees edited https://github.com/llvm/llvm-project/pull/84428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Generally this looks good to me, thanks. https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Richard Smith via cfe-commits
@@ -4564,15 +4737,41 @@ Value *ScalarExprEmitter::VisitBinAssign(const BinaryOperator *E) { case Qualifiers::OCL_None: // __block variables need to have the rhs evaluated first, plus // this should improve codegen just a little. -RHS = Visit(E->getRHS()); +Va

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Richard Smith via cfe-commits
@@ -5571,11 +5571,50 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) { break; } -RValue RV = EmitAnyExpr(E->getRHS()); +llvm::Value *Previous = nullptr; +RValue RV; +QualType SrcType = E->getRHS()->getType(); +// Chec

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Richard Smith via cfe-commits
@@ -5571,11 +5571,50 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) { break; } -RValue RV = EmitAnyExpr(E->getRHS()); +llvm::Value *Previous = nullptr; +RValue RV; +QualType SrcType = E->getRHS()->getType(); +// Chec

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Richard Smith via cfe-commits
@@ -5571,11 +5571,50 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) { break; } -RValue RV = EmitAnyExpr(E->getRHS()); +llvm::Value *Previous = nullptr; +RValue RV; +QualType SrcType = E->getRHS()->getType(); +// Chec

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Richard Smith via cfe-commits
@@ -5571,11 +5571,50 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) { break; } -RValue RV = EmitAnyExpr(E->getRHS()); +llvm::Value *Previous = nullptr; +RValue RV; +QualType SrcType = E->getRHS()->getType(); +// Chec

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Richard Smith via cfe-commits
@@ -555,13 +555,11 @@ static void handleImplicitConversion(ImplicitConversionData *Data, ReportOptions Opts, ValueHandle Src, ValueHandle Dst) { SourceLocation Loc = Data->Loc.acquire(); - ErrorType E

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Alex Crichton via cfe-commits
alexcrichton wrote: cc @sunfishcode and @sbc100 https://github.com/llvm/llvm-project/pull/84569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Richard Smith via cfe-commits
zygoloid wrote: > I'm not opposed to the changes, though I do find it somewhat strange to add > them to UBSan given that they're not undefined behavior (even though there's > precedent). This is adding checks to `-fsanitize=implicit-conversion`, which is not part of `-fsanitize=undefined`. It

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread via cfe-commits
Kupa-Martin wrote: > not an enum compare warning in C++ because `B1` doesn't have an enumeration > type due to the enumeration not being fully-defined, and is not an enum > compare warning in C because `A` has type `int` (due to p15) and `B1` has > type `int` (due to p12). Yes, you are correc

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread via cfe-commits
https://github.com/Kupa-Martin updated https://github.com/llvm/llvm-project/pull/84068 >From 4bbd5cf7eb1eeeaba8eed2ac4aba76cdbbcc671f Mon Sep 17 00:00:00 2001 From: 44-2-Kupa-Martin Date: Tue, 5 Mar 2024 17:21:02 -0300 Subject: [PATCH] [Clang][Sema] Fix type of enumerators in incomplete enumer

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread via cfe-commits
@@ -264,11 +264,14 @@ namespace { } QualType Expr::getEnumCoercedType(const ASTContext &Ctx) const { - if (isa(this->getType())) -return this->getType(); - else if (const auto *ECD = this->getEnumConstantDecl()) -return Ctx.getTypeDeclType(cast(ECD->getDeclContext())

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread via cfe-commits
@@ -6,7 +6,9 @@ typedef enum EnumA { } EnumA; enum EnumB { - B + B, Kupa-Martin wrote: done https://github.com/llvm/llvm-project/pull/84068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 commented: Does wasm-component-ld accept any other input types other than the ones that wasm-ld accepts? Does wasm-component-ld call wasm-ld internally? Do we expect clang users to be building compound components using a single clang command? i.e. will they be someh

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
sbc100 wrote: Regarding WebAssembly/wasi-sdk and WebAssembly/wasi-libc, is there any reason why simple programs wouldn't be core modules? Won't most C/C++ programs still be build-able as just core modules? https://github.com/llvm/llvm-project/pull/84569

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Alex Crichton via cfe-commits
alexcrichton wrote: Currently it accepts no extra inputs, but in the future I'd expect that it'll grow an option or two of its own. Currently it [hand-codes the list of options to forward to `wasm-ld`](https://github.com/alexcrichton/wasm-component-ld/blob/2f6106e395e2db99a8bb0524088d08bb69649

[clang] [HLSL] Add diagnostic for enabling 16 bit types (PR #84537)

2024-03-08 Thread Damyan Pepper via cfe-commits
@@ -243,6 +243,20 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch, // FIXME: add validation for enable_16bit_types should be after HLSL 2018 and damyanp wrote: Is this FIXME comment outdated by this PR? https://github.com/llvm

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
sbc100 wrote: I see, so `wasm-ld` builds "core module + metadata" and then `wasm-component-ld` takes that metadata and uses it to wrap the core module into a component (with exactly that one core module inside of it). So the core module + metadata is kind of isomorphic with that single-core-

[clang] [HLSL] Add diagnostic for enabling 16 bit types (PR #84537)

2024-03-08 Thread Joshua Batista via cfe-commits
@@ -243,6 +243,20 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch, // FIXME: add validation for enable_16bit_types should be after HLSL 2018 and bob80905 wrote: Yes, I'll remove the comment. https://github.com/llvm/llvm-projec

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
sbc100 wrote: > Currently it accepts no extra inputs, but in the future I'd expect that it'll > grow an option or two of its own I was more asking about whether the file types is accepts are anything more than object files and libraries. i.e. can you pass other core modules and have wasm-com

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/84582 This pr implements the `[[omp::assume]]` spelling for the `__attribute__((assume))` attribute. It does not change anything about how that attribute is handled by the rest of Clang. This pr is only *not* meant

<    1   2   3   4   5   >