[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
@@ -0,0 +1,71 @@ +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; CHECK: %dx.types.i32c = type { i32, i1 } + +define noundef i32 @test_UAddc(i32 noundef %a, i32 noundef %b) { +; CHECK-LABEL: define noundef i32 @test_UAddc( +

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-25 Thread via cfe-commits
Andrewyuan34 wrote: > Thanks for addressing this. However I think a more general solution is > required (instead of special-casing `std::unique_ptr`/`nullptr`), see > [#124815 > (comment)](https://github.com/llvm/llvm-project/issues/124815#issuecomment-2676753012) Thanks for the comment, I go

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-25 Thread via cfe-commits
Andrewyuan34 wrote: > LGTM. since it is just a patch instead of ideal solution for > `std::equality_comparable_with` stuff, could you add some FIXME in code? Thanks for the comment! Already added. https://github.com/llvm/llvm-project/pull/127162 ___

[clang] ad94af9 - [CIR] React to breaking change to DataLayoutTypeInterface (#128772)

2025-02-25 Thread via cfe-commits
Author: David Olsen Date: 2025-02-25T13:44:24-08:00 New Revision: ad94af973a76ecaa3e6a85304a4abe8130e88bdb URL: https://github.com/llvm/llvm-project/commit/ad94af973a76ecaa3e6a85304a4abe8130e88bdb DIFF: https://github.com/llvm/llvm-project/commit/ad94af973a76ecaa3e6a85304a4abe8130e88bdb.diff L

[clang] [CIR] React to breaking change to DataLayoutTypeInterface (PR #128772)

2025-02-25 Thread David Olsen via cfe-commits
dkolsen-pgi wrote: I am merging this now because it fixes a build breakage. If I messed up, it is easy enough to undo. https://github.com/llvm/llvm-project/pull/128772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [CIR] React to breaking change to DataLayoutTypeInterface (PR #128772)

2025-02-25 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi closed https://github.com/llvm/llvm-project/pull/128772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,71 @@ +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; CHECK: %dx.types.i32c = type { i32, i1 } + +define noundef i32 @test_UAddc(i32 noundef %a, i32 noundef %b) { +; CHECK-LABEL: define noundef i32 @test_UAddc( +

[clang] [llvm] [RISCV][MC] Add assembler support for XRivosVisni (PR #128773)

2025-02-25 Thread Sam Elliott via cfe-commits
@@ -25,3 +65,27 @@ defm RI_VZIP2B_V : VALU_IV_V<"ri.vzip2b", 0b010100>; defm RI_VUNZIP2A_V : VALU_IV_V<"ri.vunzip2a", 0b001000>; defm RI_VUNZIP2B_V : VALU_IV_V<"ri.vunzip2b", 0b011000>; } + +//===--===// +// XR

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
@@ -0,0 +1,71 @@ +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; CHECK: %dx.types.i32c = type { i32, i1 } + +define noundef i32 @test_UAddc(i32 noundef %a, i32 noundef %b) { +; CHECK-LABEL: define noundef i32 @test_UAddc( +

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,71 @@ +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; CHECK: %dx.types.i32c = type { i32, i1 } + +define noundef i32 @test_UAddc(i32 noundef %a, i32 noundef %b) { +; CHECK-LABEL: define noundef i32 @test_UAddc( +

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/128792 This change implements basic support in ClangIR for local variables using the cir.alloca and cir.load operations. >From 235ef9e23a314f8946b48143294da367b80f7d14 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Da

[clang] 0983277 - [CMake][Release] Statically link ZSTD on all OSes (#128554)

2025-02-25 Thread via cfe-commits
Author: Tom Stellard Date: 2025-02-25T16:10:20-08:00 New Revision: 09832777d830e0fddff84bf36793ec4e453656b0 URL: https://github.com/llvm/llvm-project/commit/09832777d830e0fddff84bf36793ec4e453656b0 DIFF: https://github.com/llvm/llvm-project/commit/09832777d830e0fddff84bf36793ec4e453656b0.diff

[clang] [CIR] Function type return type improvements (PR #128787)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -282,40 +283,55 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, -llvm::SmallVector ¶ms, -

[clang] [CMake][Release] Statically link ZSTD on all OSes (PR #128554)

2025-02-25 Thread Tom Stellard via cfe-commits
tstellar wrote: /cherry-pick 09832777d830e0fddff84bf36793ec4e453656b0 https://github.com/llvm/llvm-project/pull/128554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Release] Statically link ZSTD on all OSes (PR #128554)

2025-02-25 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#128793 https://github.com/llvm/llvm-project/pull/128554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Release] Statically link ZSTD on all OSes (PR #128554)

2025-02-25 Thread Tom Stellard via cfe-commits
https://github.com/tstellar closed https://github.com/llvm/llvm-project/pull/128554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Release] Statically link ZSTD on all OSes (PR #128554)

2025-02-25 Thread Tom Stellard via cfe-commits
https://github.com/tstellar milestoned https://github.com/llvm/llvm-project/pull/128554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This change implements basic support in ClangIR for local variables using the cir.alloca and cir.load operations. --- Patch is 42.22 KiB, truncated to 20.00 KiB below, full version: https://github.com/

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--fmodule-output` (PR #121046)

2025-02-25 Thread Sharadh Rajaraman via cfe-commits
@@ -6097,10 +6097,29 @@ const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA, } llvm::PrettyStackTraceString CrashInfo("Computing output path"); + // Output to a user requested destination? if (AtTopLevel && !isa(JA) && !isa(JA)) { -if (Arg

[clang] cd4c30b - [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (#128086)

2025-02-25 Thread via cfe-commits
Author: Ashley Coleman Date: 2025-02-25T17:23:09-07:00 New Revision: cd4c30bb224e432d8cd37f375c138cbaada14f6c URL: https://github.com/llvm/llvm-project/commit/cd4c30bb224e432d8cd37f375c138cbaada14f6c DIFF: https://github.com/llvm/llvm-project/commit/cd4c30bb224e432d8cd37f375c138cbaada14f6c.diff

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Adrian Prantl via cfe-commits
@@ -492,8 +492,23 @@ static std::string getModuleContextHash(const ModuleDeps &MD, auto &FSOpts = const_cast(CI.getFileSystemOpts()); if (CWD && !IgnoreCWD) HashBuilder.add(*CWD); - else + else { FSOpts.WorkingDir.clear(); +auto &CGOpts = const_cast(CI.getCo

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Craig Topper via cfe-commits
@@ -0,0 +1,35 @@ +# RUN: not llvm-mc -triple=riscv32 -mattr=+experimental-xqccmp -M no-aliases -show-encoding < %s 2>&1 \ +# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s + +# CHECK-ERROR: error: invalid operand for instruction +qc.cm.mvsa01 a1, a2 + +# CHECK-ERROR: error:

[clang] [clang] more useful error message for decomposition declaration missing initializer (PR #127924)

2025-02-25 Thread via cfe-commits
https://github.com/kbrav updated https://github.com/llvm/llvm-project/pull/127924 >From 7f7b9b3f2e7324bd290decb7151c9432875b1dd6 Mon Sep 17 00:00:00 2001 From: kbrav Date: Wed, 19 Feb 2025 19:05:05 -0500 Subject: [PATCH 1/3] [clang] more useful error message for decomposition declaration missi

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Marco Elver via cfe-commits
https://github.com/melver updated https://github.com/llvm/llvm-project/pull/127396 >From a70f021becb2888d6c2a63b2d1e619393a996058 Mon Sep 17 00:00:00 2001 From: Marco Elver Date: Sun, 16 Feb 2025 14:53:41 +0100 Subject: [PATCH 1/2] Thread Safety Analysis: Handle address-of followed by derefere

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Marco Elver via cfe-commits
@@ -143,6 +143,11 @@ Improvements to Clang's diagnostics - A statement attribute applied to a ``case`` label no longer suppresses 'bypassing variable initialization' diagnostics (#84072). +- The :doc:`ThreadSafetyAnalysis` now supports ``-Wthread-safety-pointer`` ---

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Marco Elver via cfe-commits
melver wrote: > I only have a few comments about documenting the caveats (no alias analysis). > > The actual code changes look very simple and this looks like a clear > improvement that would catch many useful cases. > > I don't have much experience with this code and would still advise to wai

[clang] [clang] Added warn-assignment-bool-context (PR #115234)

2025-02-25 Thread Philipp Rados via cfe-commits
https://github.com/PhilippRados updated https://github.com/llvm/llvm-project/pull/115234 >From e819360e6510f12f19b7df9d4eb22c0943776440 Mon Sep 17 00:00:00 2001 From: PhilippR Date: Thu, 7 Nov 2024 00:06:24 +0100 Subject: [PATCH 1/5] [clang] Added warn-assignment-bool-context This warning is i

[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)

2025-02-25 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/127113 >From 1995b54afcc9fab93e7e80d3993d3396f193b31d Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 13 Feb 2025 11:24:32 -0800 Subject: [PATCH 1/4] [OpenMP] Missing implicit otherwise clause in metadi

[clang] [HLSL][Sema] Fix Struct Size Calculation containing 16/32 bit scalars (PR #128086)

2025-02-25 Thread Tex Riddell via cfe-commits
@@ -172,6 +172,23 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool CBuffer, return Result; } +static unsigned calculateLegacyCbufferFieldAlign(const ASTContext &Context, + QualType T) { + // Arrays and Structs are

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-25 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: I would prefer to have a new op. Other dialect also represent this with multiple operations (sci.for vs. sci.parallel). But I will let @jeanPerier weight in on this. I guess the op was not very necessary for your first few patches but representing the do concurrent accuratel

[clang] [llvm] [RISCV] Xqcia 0.4 Spec renamed qc.(sla/sll)sat to qc.(shl/shlu)sat (PR #128710)

2025-02-25 Thread Luke Quinn via cfe-commits
https://github.com/lquinn2015 updated https://github.com/llvm/llvm-project/pull/128710 >From c8007edad8767d3a3a117c9408d9ec5a78af76a7 Mon Sep 17 00:00:00 2001 From: Luke Quinn Date: Mon, 24 Feb 2025 14:34:15 -0800 Subject: [PATCH 1/3] [RISCV] XQCIA 0.4 spec renamed qc.slasat->qc.shlsat qc.sll

[clang] [llvm] [mlir] [NVPTX] Convert vector function nvvm.annotations to attributes (PR #127736)

2025-02-25 Thread Alex MacLean via cfe-commits
AlexMaclean wrote: @hanhanW, @akuegel Heads up, if you're using any of these annotations, I expect you'll need to update your respective out-of-tree frontends once this change lands (similar to https://github.com/llvm/llvm-project/pull/119261). Here's an example of what that might look like:

[clang] [spirv][amdgpu] Set atomic size in the clang target info (PR #128569)

2025-02-25 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield closed https://github.com/llvm/llvm-project/pull/128569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Cyndy Ishida via cfe-commits
@@ -492,8 +492,23 @@ static std::string getModuleContextHash(const ModuleDeps &MD, auto &FSOpts = const_cast(CI.getFileSystemOpts()); if (CWD && !IgnoreCWD) HashBuilder.add(*CWD); - else + else { FSOpts.WorkingDir.clear(); +auto &CGOpts = const_cast(CI.getCo

[clang] 43999de - [spirv][amdgpu] Set atomic size in the clang target info (#128569)

2025-02-25 Thread via cfe-commits
Author: Jon Chesterfield Date: 2025-02-25T18:31:10Z New Revision: 43999deb370113945ef86680014f838f55315ee7 URL: https://github.com/llvm/llvm-project/commit/43999deb370113945ef86680014f838f55315ee7 DIFF: https://github.com/llvm/llvm-project/commit/43999deb370113945ef86680014f838f55315ee7.diff L

[clang] [llvm] [mlir] [NVPTX] Convert vector function nvvm.annotations to attributes (PR #127736)

2025-02-25 Thread Han-Chung Wang via cfe-commits
hanhanW wrote: Thanks for the heads-up! We do have few cases like: ```cpp setMetadataValueI32("maxntidx", workgroupSize[0]); setMetadataValueI32("maxntidy", workgroupSize[1]); setMetadataValueI32("maxntidz", workgroupSize[2]); https://github.com/llvm/llvm-project/p

[clang] [analyzer] Update the undefined assignment checker diagnostics to not use the term 'garbage' (PR #126596)

2025-02-25 Thread David Tarditi via cfe-commits
dtarditi wrote: Thanks everyone for the reviews and feedback. I don't have write access for LLVM. @NagyDonat or @haoNoQ, could you merge it on my behalf? Do you want me to condense the change to a single commit as recommended [here](https://llvm.org/docs/GitHub.html#landing-your-change)? A

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Jan Svoboda via cfe-commits
@@ -129,6 +129,26 @@ static void optimizeDiagnosticOpts(DiagnosticOptions &Opts, Opts.Remarks.clear(); } +static void optimizeCWD(FileSystemOptions &FSOpts, CodeGenOptions &CGOpts, +const std::string &CWD) { jansvoboda11 wrote: In LL

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
@@ -492,8 +492,23 @@ static std::string getModuleContextHash(const ModuleDeps &MD, auto &FSOpts = const_cast(CI.getFileSystemOpts()); if (CWD && !IgnoreCWD) HashBuilder.add(*CWD); - else + else { FSOpts.WorkingDir.clear(); +auto &CGOpts = const_cast(CI.getCo

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. I think it's reasonable and we should probably get this in before the release window. https://github.com/llvm/llvm-project/pull/128166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Clang][CodeGen] Fix crash when using bool vector in compound assignment (PR #75435)

2025-02-25 Thread via cfe-commits
TiborGY wrote: @cygao90 Do you still intend to get this PR merged? https://github.com/llvm/llvm-project/pull/75435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Additional fixes for #114062 (PR #128166)

2025-02-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 milestoned https://github.com/llvm/llvm-project/pull/128166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] React to breaking change to DataLayoutTypeInterface (PR #128772)

2025-02-25 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi created https://github.com/llvm/llvm-project/pull/128772 In #128754, `DataLayoutTypeInterface` was changed to give `getPreferredAlignment` a default implemention. As a result, table-gen no longer declared `getPreferredAlignment` when defining a class that contai

[clang] [CIR] React to breaking change to DataLayoutTypeInterface (PR #128772)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: David Olsen (dkolsen-pgi) Changes In #128754, `DataLayoutTypeInterface` was changed to give `getPreferredAlignment` a default implemention. As a result, table-gen no longer declared `getPreferredAlignment` when defining a class that co

[clang] [CIR] React to breaking change to DataLayoutTypeInterface (PR #128772)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Olsen (dkolsen-pgi) Changes In #128754, `DataLayoutTypeInterface` was changed to give `getPreferredAlignment` a default implemention. As a result, table-gen no longer declared `getPreferredAlignment` when defining a class that cont

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-02-25 Thread via cfe-commits
@@ -0,0 +1,472 @@ +#!/usr/bin/env python3 + +"""generate_unsupported_in_drivermode.py + +This script generates Lit regression test files that validate that options are only exposed to intended driver modes. + +The options and driver modes are parsed from Options.td, whose path sh

[clang] [CIR] React to breaking change to DataLayoutTypeInterface (PR #128772)

2025-02-25 Thread David Olsen via cfe-commits
dkolsen-pgi wrote: @bcardosolopes @lanza You will run into this same problem with the next incubator rebase. The fix should be the same, though there will be more `getPreferredAlignment` functions to delete. https://github.com/llvm/llvm-project/pull/128772 __

[clang] [llvm] [RISCV][MC] Add assembler support for XRivosVisni (PR #128773)

2025-02-25 Thread Philip Reames via cfe-commits
https://github.com/preames created https://github.com/llvm/llvm-project/pull/128773 This implements assembler support for the XRivosVisni custom/vendor extension from Rivos Inc. which is defined in: https://github.com/rivosinc/rivos-custom-extensions (See src/xrivosvisni.adoc) Codegen support

[clang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-02-25 Thread via cfe-commits
@@ -0,0 +1,472 @@ +#!/usr/bin/env python3 + +"""generate_unsupported_in_drivermode.py + +This script generates Lit regression test files that validate that options are only exposed to intended driver modes. + +The options and driver modes are parsed from Options.td, whose path sh

[clang] [llvm] [RISCV][MC] Add assembler support for XRivosVisni (PR #128773)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Philip Reames (preames) Changes This implements assembler support for the XRivosVisni custom/vendor extension from Rivos Inc. which is defined in: https://github.com/rivosinc/rivos-custom-extensions (See src/xrivosvisni.adoc) Codegen supp

[clang] [llvm] [RISCV][MC] Add assembler support for XRivosVisni (PR #128773)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Philip Reames (preames) Changes This implements assembler support for the XRivosVisni custom/vendor extension from Rivos Inc. which is defined in: https://github.com/rivosinc/rivos-custom-extensions (See src/xrivosvisni.adoc) Codegen support

[clang] [llvm] [MergeFuncs] Don't introduce calls to (linkonce,weak)_odr functions. (PR #125050)

2025-02-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/125050 >From 3133b6bf495e82ec63a29ab639ab91ddd7421464 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 30 Jan 2025 11:33:12 + Subject: [PATCH 1/7] [MergeFuncs] Don't introduce calls to weak_odr functions. Avoi

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-25 Thread via cfe-commits
@@ -1826,6 +1827,12 @@ The following type trait primitives are supported by Clang. Those traits marked functionally equivalent to copying the underlying bytes and then dropping the source object on the floor. This is true of trivial types and types which were made trivia

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -1826,6 +1827,12 @@ The following type trait primitives are supported by Clang. Those traits marked functionally equivalent to copying the underlying bytes and then dropping the source object on the floor. This is true of trivial types and types which were made trivia

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-02-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/121577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve diagnostics for vector builtins (PR #125673)

2025-02-25 Thread Joseph Huber via cfe-commits
@@ -2266,8 +2266,10 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { if (CheckVectorElementCallArgs(&SemaRef, TheCall)) return true; if (SemaRef.BuiltinElementwiseTernaryMath( -TheCall, /*CheckForFloatArgs*/ -

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2025-02-25 Thread via cfe-commits
AZero13 wrote: @ahatanak Okay I removed the null check. https://github.com/llvm/llvm-project/pull/85465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve -Wsign-compare diagnostic (PR #128614)

2025-02-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I don't think this patch is the right way forward. We shouldn't lie to the user about the type, and have to count on the left side of the diagnostic to tell them how to analyze the types to figure out the problem. Qualifiers are part of the type, so b

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2025-02-25 Thread via cfe-commits
https://github.com/AZero13 updated https://github.com/llvm/llvm-project/pull/85465 >From c98fb3d99b71f2e418cd0cd18b65090aa5a946ca Mon Sep 17 00:00:00 2001 From: Rose Date: Fri, 15 Mar 2024 16:43:10 -0400 Subject: [PATCH] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2025-02-25 Thread via cfe-commits
https://github.com/AZero13 updated https://github.com/llvm/llvm-project/pull/85465 >From 2a8d69745c9fc34e2f049d43a17950cf99bee3e2 Mon Sep 17 00:00:00 2001 From: Rose Date: Fri, 15 Mar 2024 16:43:10 -0400 Subject: [PATCH] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Marco Elver via cfe-commits
melver wrote: > > I need to commit this by end of day Wednesday - if I should wait a little > > longer, let me know so I can plan around it. Thanks. > > Sorry, but I'm at C standards meetings this week, so I don't think I'll be > able to review it by then. CC @aaronpuchert who maybe can help?

[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

2025-02-25 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/127336 >From 272385df25b791b50472b92e12157477d021a26f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 15 Feb 2025 18:19:44 +0200 Subject: [PATCH 1/6] [Clang] add -Wshift-bool warning to handle shifting of boo

[clang] [CodeGen] Replace PointerType::getUnqual(Type) with opaque pointer version (NFC) (PR #128711)

2025-02-25 Thread Mats Jun Larsen via cfe-commits
https://github.com/junlarsen created https://github.com/llvm/llvm-project/pull/128711 pointer version (NFC) Follow-up to #123569 >From 22a07820dee329ed68ea2a2cd3b619f980047de9 Mon Sep 17 00:00:00 2001 From: Mats Jun Larsen Date: Tue, 25 Feb 2025 14:09:39 +0100 Subject: [PATCH] [CodeGen] Repla

[clang] [Clang][counted_by] Add support for 'counted_by' on struct pointers (PR #127116)

2025-02-25 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/127116 >From b5b9b158e7e379f2d430584e3ccf519677bf27a3 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 10 Jan 2025 17:13:30 -0800 Subject: [PATCH 1/3] [Clang][counted_by] Add support for 'counted_by' on struc

[clang] [CodeGen] Replace PointerType::getUnqual(Type) with opaque pointer version (NFC) (PR #128711)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Mats Jun Larsen (junlarsen) Changes pointer version (NFC) Follow-up to #123569 --- Full diff: https://github.com/llvm/llvm-project/pull/128711.diff 4 Files Affected: - (modified) clang/lib/CodeGen/ABI

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,72 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; CHECK: %dx.types.i32c = type { i32, i1 } + +define noundef i

[clang] [SafeBuffers] Check if unsafe-buffers* warnings are enabled earlier (PR #128603)

2025-02-25 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem approved this pull request. https://github.com/llvm/llvm-project/pull/128603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SafeBuffers] Check if unsafe-buffers* warnings are enabled earlier (PR #128603)

2025-02-25 Thread Hans Wennborg via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -std=c++17 -Wno-all -Wunsafe-buffer-usage \ zmodem wrote: nit: No need for the line break? https://github.com/llvm/llvm-project/pull/128603 ___ cfe-commits mailing list cfe-commits@

[clang] [CodeGen] Replace PointerType::getUnqual(Type) with opaque pointer version (NFC) (PR #128711)

2025-02-25 Thread Mats Jun Larsen via cfe-commits
junlarsen wrote: * **#128711** https://app.graphite.dev/github/pr/llvm/llvm-project/128711?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/12

[clang] [SafeBuffers] Check if unsafe-buffers* warnings are enabled earlier (PR #128603)

2025-02-25 Thread Hans Wennborg via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -std=c++17 -Wno-all -Wunsafe-buffer-usage \ +// RUN:-verify %s + +// Previously we had a bug where we would diagnose *no* unsafe buffer warnings +// if the warning was disabled by pragma and left disabled until end-of-TU. +// This i

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-25 Thread Nikolas Klauser via cfe-commits
@@ -1826,6 +1827,12 @@ The following type trait primitives are supported by Clang. Those traits marked functionally equivalent to copying the underlying bytes and then dropping the source object on the floor. This is true of trivial types and types which were made trivia

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Younan Zhang via cfe-commits
@@ -377,8 +377,12 @@ struct ConvertConstructorToDeductionGuideTransform { if (NestedPattern) Args.addOuterRetainedLevels(NestedPattern->getTemplateDepth()); auto [Depth, Index] = getDepthAndIndex(Param); +assert(Depth || + cast(FT

[clang] [ARM] Aligned mtp behavior and gcc (PR #128728)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Austin (Zhenhang1213) Changes Fix #123864, resolved of the different form behavior of mtp --- Full diff: https://github.com/llvm/llvm-project/pull/128728.diff 5 Files Affected: - (modified) clang/include/clang/Driver/Options.td (+1-1)

[clang] [ARM] Aligned mtp behavior and gcc (PR #128728)

2025-02-25 Thread via cfe-commits
https://github.com/Zhenhang1213 updated https://github.com/llvm/llvm-project/pull/128728 >From 4ca0fa7f65901638ea5bae9ad00a76e1bb5f37c9 Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 25 Feb 2025 01:24:24 +0800 Subject: [PATCH] [ARM] Aligned mtp behavior and gcc Fix #123864, resolved of the d

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/128437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
@@ -3863,6 +3863,192 @@ TEST_P(UncheckedOptionalAccessTest, ConstBoolAccessorWithModInBetween) { )cc"); } +TEST_P(UncheckedOptionalAccessTest, + ConstRefAccessorToOptionalViaConstRefAccessorToHoldingObject) { + ExpectDiagnosticsFor(R"cc( +#include "unchecked_opti

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
@@ -3863,6 +3863,192 @@ TEST_P(UncheckedOptionalAccessTest, ConstBoolAccessorWithModInBetween) { )cc"); } +TEST_P(UncheckedOptionalAccessTest, + ConstRefAccessorToOptionalViaConstRefAccessorToHoldingObject) { + ExpectDiagnosticsFor(R"cc( +#include "unchecked_opti

[clang] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-25 Thread Jan Voung via cfe-commits
@@ -580,6 +580,26 @@ void handleConstMemberCall(const CallExpr *CE, return; } + // Cache if the const method returns a reference + if (RecordLoc != nullptr && CE->isGLValue()) { +const FunctionDecl *DirectCallee = CE->getDirectCallee(); +if (DirectCallee == nul

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
@@ -738,6 +739,16 @@ def UMin : DXILOp<40, binary> { let attributes = [Attributes]; } +def UAddc : DXILOp<44, binaryWithCarryOrBorrow > { + let Doc = "Unsigned 32-bit integer arithmetic add with carry. uaddc(a,b) = (a+b, a+b overflowed ? 1 : 0)"; + let intrinsics = [Intri

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2025-02-25 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q

[clang] [CodeGen][ObjCGNU] Replace PointerType::getUnqual(Type) with opaque pointer version (NFC) (PR #128715)

2025-02-25 Thread Mats Jun Larsen via cfe-commits
@@ -3270,9 +3263,7 @@ CGObjCGNU::GenerateProtocolList(ArrayRef Protocols) { llvm::Value *CGObjCGNU::GenerateProtocolRef(CodeGenFunction &CGF, const ObjCProtocolDecl *PD) { auto protocol = GenerateProtocolRef(PD); - llvm::Type *T =

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-25 Thread Nikolas Klauser via cfe-commits
@@ -1826,6 +1827,12 @@ The following type trait primitives are supported by Clang. Those traits marked functionally equivalent to copying the underlying bytes and then dropping the source object on the floor. This is true of trivial types and types which were made trivia

[clang] [clang][bytecode] Check dtor instance pointers for active-ness (PR #128732)

2025-02-25 Thread Shafik Yaghmour via cfe-commits
@@ -504,4 +504,39 @@ namespace AnonymousUnion { static_assert(return_init_all().a.p == 7); // both-error {{}} \ // both-note {{read of member 'p' of union with no active member}} } + +namespace InactiveDestroy { + struct A { +

[clang] [clang][bytecode] Check dtor instance pointers for active-ness (PR #128732)

2025-02-25 Thread Shafik Yaghmour via cfe-commits
@@ -504,4 +504,39 @@ namespace AnonymousUnion { static_assert(return_init_all().a.p == 7); // both-error {{}} \ // both-note {{read of member 'p' of union with no active member}} } + +namespace InactiveDestroy { + struct A { +

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
@@ -738,6 +739,16 @@ def UMin : DXILOp<40, binary> { let attributes = [Attributes]; } +def UAddc : DXILOp<44, binaryWithCarryOrBorrow > { + let Doc = "Unsigned 32-bit integer arithmetic add with carry. uaddc(a,b) = (a+b, a+b overflowed ? 1 : 0)"; + let intrinsics = [Intri

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Deric Cheung via cfe-commits
@@ -738,6 +739,16 @@ def UMin : DXILOp<40, binary> { let attributes = [Attributes]; } +def UAddc : DXILOp<44, binaryWithCarryOrBorrow > { + let Doc = "Unsigned 32-bit integer arithmetic add with carry. uaddc(a,b) = (a+b, a+b overflowed ? 1 : 0)"; + let intrinsics = [Intri

[clang] 041b7f5 - [Wunsafe-buffer-usage] Turn off unsafe-buffer warning for methods annotated with clang::unsafe_buffer_usage attribute (#125671)

2025-02-25 Thread via cfe-commits
Author: Malavika Samak Date: 2025-02-25T23:09:26+05:30 New Revision: 041b7f508533417bcda4feaa03d6c16ff85275f5 URL: https://github.com/llvm/llvm-project/commit/041b7f508533417bcda4feaa03d6c16ff85275f5 DIFF: https://github.com/llvm/llvm-project/commit/041b7f508533417bcda4feaa03d6c16ff85275f5.diff

[clang] [clang][ASTImporter] Fix AST import if anonymous namespaces are merged (PR #128735)

2025-02-25 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/128735 I discovered one faulty case that is shown in the second of the added tests (an anonymous namespace is imported that resides in a `extern "C"` block). I did not check for other possibilities for namespaces tha

[clang] [clang][ASTImporter] Fix AST import if anonymous namespaces are merged (PR #128735)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes I discovered one faulty case that is shown in the second of the added tests (an anonymous namespace is imported that resides in a `extern "C"` block). I did not check for other possibilities for namespaces t

[clang] [clang][bytecode][NFC] Add missing LLVM_PREFERRED_TYPE to bitfield (PR #128740)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/128740.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Descriptor.h (+2-1) ``diff diff --git a/clang/lib/AST/ByteCode/Descrip

[libclc] a821ae2 - [libclc] Move round to CLC library (#128721)

2025-02-25 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-02-25T16:24:57Z New Revision: a821ae284724f1522297c0b455b1ca5c05fbc270 URL: https://github.com/llvm/llvm-project/commit/a821ae284724f1522297c0b455b1ca5c05fbc270 DIFF: https://github.com/llvm/llvm-project/commit/a821ae284724f1522297c0b455b1ca5c05fbc270.diff LOG

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/4] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,95 @@ +//=== RISCVInstrInfoXqccmp.td --*- tablegen -*-===// +// +// 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: Apa

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-02-25 Thread Aidan Goldfarb via cfe-commits
@@ -3572,10 +3572,17 @@ TemplateDeductionResult Sema::SubstituteExplicitTemplateArguments( SugaredBuilder, CanonicalBuilder, /*UpdateArgsWithConversions=*/false) || Trap.hasErrorOccurred()) { + unsigned

[clang] [Wunsafe-buffer-usage] Turn off unsafe-buffer warning for methods annotated with clang::unsafe_buffer_usage attribute (PR #125671)

2025-02-25 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak closed https://github.com/llvm/llvm-project/pull/125671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >