[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-28 Thread Amr Hesham via cfe-commits
@@ -162,3 +162,10 @@ struct A { }; A<0>::B a; } + +template void shadow() { // expected-note{{template parameter is declared here}} AmrDeveloper wrote: You mean something like 'template void shadow2() { ... }` or creating a sample with function call http

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/129116 >From ed0cf3f026e439288f8334f27555ad26825fd56a Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 27 Feb 2025 21:49:32 +0100 Subject: [PATCH 1/3] [Clang][diagnostics] Fix structured binding shadows tem

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Joshua Batista via cfe-commits
@@ -131,3 +157,9 @@ double3 test_min_double3(double3 p0, double3 p1) { return min(p0, p1); } // CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> @_Z16test_min_double4 // CHECK: call reassoc nnan ninf nsz arcp afn <4 x double> @llvm.minnum.v4f64 double4 test_min_dou

[clang] [llvm] [clang][CodeGen][AA] Add `!llvm.errno.tbaa` gathering int-compatible TBAA nodes (PR #125258)

2025-02-28 Thread Nikita Popov via cfe-commits
nikic wrote: > > > so IIUC !llvm.errno.tbaa should just be a module-level list of > > > int-compatible TBAA nodes. > > > > > > Yes, exactly. It should be a module level MD node, not on individual > > instructions. > > Thank you, I'm updating this. I've been contemplating this, and thought >

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Sarah Spall via cfe-commits
@@ -131,3 +157,9 @@ double3 test_min_double3(double3 p0, double3 p1) { return min(p0, p1); } // CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double> @_Z16test_min_double4 // CHECK: call reassoc nnan ninf nsz arcp afn <4 x double> @llvm.minnum.v4f64 double4 test_min_dou

[clang] [CUDA][HIP] fix virtual dtor host/device attr (PR #128926)

2025-02-28 Thread Artem Belevich via cfe-commits
@@ -32,22 +32,24 @@ public: template class B; } -// The implicit host/device attrs of virtual dtor B::~B() is inferred to -// have implicit device attr since dtors of its members and parent classes can -// be executed on device. This causes a diagnostic since B::~B() must -//

[clang] [CUDA][HIP] fix virtual dtor host/device attr (PR #128926)

2025-02-28 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/128926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. I can approve this, though it might be worth considering adding a macro at the top of hlsl_intrinsics.h, along with some of the other macros there, to shrink the change and possibly simplify future changes that need these types of sets of

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-28 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang][HIP] Make some math not not work with AMDGCN SPIR-V #128360" (PR #129306)

2025-02-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 7 "test-build-unified-tree-check-llvm". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/20773 Here is the re

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl gd, llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition"); } +static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) { + assert(!cir::MissingFeatures::supportComdat

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-02-28 Thread Reid Kleckner via cfe-commits
rnk wrote: If you take the two PRs together, we're going to implement the indirection logic at both the frontend and backend level. If we do it in the backend, I think it's technically necessary to do it in the frontend, but it is consistent with how we handle all other types. I'd like to see

[clang] [llvm] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-28 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg updated https://github.com/llvm/llvm-project/pull/128920 >From 2e1946730f7ae2473a4fc94f8918eb3d9d225d17 Mon Sep 17 00:00:00 2001 From: Ellis Hoag Date: Wed, 26 Feb 2025 09:48:46 -0800 Subject: [PATCH 1/3] [memprof] Export __memprof_default_options_str on Darwin ---

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl gd, llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition"); } +static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) { + assert(!cir::MissingFeatures::supportComdat

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-02-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -57,3 +57,15 @@ bool boolfunc() { return true; } // CHECK: %0 = cir.const #true // CHECK: cir.return %0 : !cir.bool // CHECK: } + +float floatfunc() { return 42.42f; } +// CHECK: cir.func @floatfunc() -> !cir.float { +// CHECK: %0 = cir.const #cir.fp<4.242000e+01> : !c

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-02-28 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/129304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/129334 >From ebaef38c40cba83d4b446a5320d57c86038f8286 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Fri, 28 Feb 2025 11:18:03 -0800 Subject: [PATCH 1/3] new max overloads + new min overloads --- clang/lib/Headers/hl

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Sarah Spall via cfe-commits
spall wrote: > Are there any error conditions that need testing as well? I don't think there were error tests for min and max originally. I could add some to make sure things like min(int4, int3) are still now allowed. https://github.com/llvm/llvm-project/pull/129334 __

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/129334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Ensure the SPIRV target is enabled for test that uses AMDGCNSPIRV (PR #129298)

2025-02-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/129298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-28 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg updated https://github.com/llvm/llvm-project/pull/128920 >From 2e1946730f7ae2473a4fc94f8918eb3d9d225d17 Mon Sep 17 00:00:00 2001 From: Ellis Hoag Date: Wed, 26 Feb 2025 09:48:46 -0800 Subject: [PATCH 1/2] [memprof] Export __memprof_default_options_str on Darwin ---

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-28 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > we can't have epilogs in chained unwind tables, since they are only for > additional savereg codes. How do epilogs work in chained unwind tables? Do the epilog opcodes from the original table get ignored? If they do get ignored, can you specify different opcodes in th

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -733,16 +733,17 @@ ENVIRONMENT .. envvar:: CPATH - If this environment variable is present, it is treated as a delimited list of - paths to be added to the default system include path list. The delimiter is - the platform dependent delimiter, as used in the PATH environ

[clang] Reapply "[clang][HIP] Make some math not not work with AMDGCN SPIR-V #128360" (PR #129306)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex Voicu (AlexVlx) Changes This reapplies #128360, the only change being that the modified tests also checks for the availability of the SPIRV target. --- Patch is 183.47 KiB, truncated to 20.00 KiB below, full version: https://github

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-02-28 Thread Tom Honermann via cfe-commits
@@ -733,16 +733,17 @@ ENVIRONMENT .. envvar:: CPATH - If this environment variable is present, it is treated as a delimited list of - paths to be added to the default system include path list. The delimiter is - the platform dependent delimiter, as used in the PATH environ

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -57,3 +57,15 @@ bool boolfunc() { return true; } // CHECK: %0 = cir.const #true // CHECK: cir.return %0 : !cir.bool // CHECK: } + +float floatfunc() { return 42.42f; } +// CHECK: cir.func @floatfunc() -> !cir.float { +// CHECK: %0 = cir.const #cir.fp<4.242000e+01> : !c

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

2025-02-28 Thread via cfe-commits
GeorgeKA wrote: - I should draw attention to a change I made when it comes to option prefixes. Put simply, I had to switch to using prefix "-" instead of "/" because of different error output for "/". I describe it [here](https://github.com/llvm/llvm-project/blob/1e6150bc23c3410945cddb9d1d33f6

[clang] a19e685 - [CIR] Realign CIR-to-LLVM IR lowering code with incubator (#129293)

2025-02-28 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-02-28T14:43:39-08:00 New Revision: a19e685ea228ec367a7fa01bbf811c3cded37a83 URL: https://github.com/llvm/llvm-project/commit/a19e685ea228ec367a7fa01bbf811c3cded37a83 DIFF: https://github.com/llvm/llvm-project/commit/a19e685ea228ec367a7fa01bbf811c3cded37a83.diff L

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/129293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] fix virtual dtor host/device attr (PR #128926)

2025-02-28 Thread Artem Belevich via cfe-commits
@@ -32,22 +32,24 @@ public: template class B; } -// The implicit host/device attrs of virtual dtor B::~B() is inferred to -// have implicit device attr since dtors of its members and parent classes can -// be executed on device. This causes a diagnostic since B::~B() must -//

[clang] Reapply "[clang][HIP] Make some math not not work with AMDGCN SPIR-V #128360" (PR #129306)

2025-02-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/129306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-28 Thread via cfe-commits
@@ -0,0 +1,38 @@ +//===--- TrueMacroCheck.h - clang-tidy --*- 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: Apa

[clang] [clang][analyzer] Add checker 'alpha.core.FixedAddressDereference' (PR #127191)

2025-02-28 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/127191 From 1f2ad6d5ce6f11fb031ec2175527f56ea86761ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Mon, 3 Feb 2025 15:35:31 +0100 Subject: [PATCH 1/6] [clang][analyzer] Add checker 'alpha.c

[clang] [HLSL] Add HLSLResourceBindingAttr to default constant buffer numeric declarations ($Globals) (PR #128981)

2025-02-28 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/128981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Marco C. (Marcondiro) Changes This reflects the add_new_check.py changes: isLanguageVersionSupported is now overridden by default by the script The changes were instroduced in https://github.com/llvm/llvm-project/pull/100129

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/127653 >From cde82a27139c39406a9afb5b471fa527e52e5bca Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 18 Feb 2025 15:27:37 +0100 Subject: [PATCH 1/8] [Coroutines] Mark parameter allocas with coro.outside.frame

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 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] d0edd93 - [Coroutines] Mark parameter allocas with coro.outside.frame metadata (#127653)

2025-02-28 Thread via cfe-commits
Author: Hans Wennborg Date: 2025-02-28T09:54:47+01:00 New Revision: d0edd931bcc328b9502289d346f2b2219341f853 URL: https://github.com/llvm/llvm-project/commit/d0edd931bcc328b9502289d346f2b2219341f853 DIFF: https://github.com/llvm/llvm-project/commit/d0edd931bcc328b9502289d346f2b2219341f853.diff

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem closed https://github.com/llvm/llvm-project/pull/127653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clang: Add minnum/maxnum builtin functions (PR #129207)

2025-02-28 Thread Matt Arsenault via cfe-commits
@@ -209,6 +209,18 @@ def FmaxF16F128 : Builtin, F16F128MathTemplate { let Prototype = "T(T, T)"; } +def MinNum : Builtin { arsenm wrote: Should the keep the f prefix convention? I suppose we aren't following a libm function, so it might make sense to drop

[clang] [CIR] Upstream func args alloca handling (PR #129167)

2025-02-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/129167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes The previously upstreamed lowering from ClangIR to LLVM IR diverged from the incubator implementation, but when the incubator was updated to incorporate these changes some issues arose which require the

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/129293 The previously upstreamed lowering from ClangIR to LLVM IR diverged from the incubator implementation, but when the incubator was updated to incorporate these changes some issues arose which require the upst

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-28 Thread Eli Friedman via cfe-commits
@@ -500,7 +500,8 @@ MCSymbol *MCStreamer::emitLineTableLabel() { MCSymbol *MCStreamer::emitCFILabel() { // Return a dummy non-null value so that label fields appear filled in when // generating textual assembly. - return (MCSymbol *)1; + static size_t DummyLabelValue = 0;

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

2025-02-28 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 09b809d803ca319f194eba6b6d8a78fa6dbbf9f3 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

[clang] [CUDA][HIP] fix virtual dtor host/device attr (PR #128926)

2025-02-28 Thread Yaxun Liu via cfe-commits
@@ -32,22 +32,24 @@ public: template class B; } -// The implicit host/device attrs of virtual dtor B::~B() is inferred to -// have implicit device attr since dtors of its members and parent classes can -// be executed on device. This causes a diagnostic since B::~B() must -//

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -57,3 +57,15 @@ bool boolfunc() { return true; } // CHECK: %0 = cir.const #true // CHECK: cir.return %0 : !cir.bool // CHECK: } + +float floatfunc() { return 42.42f; } +// CHECK: cir.func @floatfunc() -> !cir.float { +// CHECK: %0 = cir.const #cir.fp<4.242000e+01> : !c

[clang] 56cc929 - [CIR] Upstream func args alloca handling (#129167)

2025-02-28 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-02-28T11:43:53-08:00 New Revision: 56cc9299b7804257549edb4a7ba15999cbb5 URL: https://github.com/llvm/llvm-project/commit/56cc9299b7804257549edb4a7ba15999cbb5 DIFF: https://github.com/llvm/llvm-project/commit/56cc9299b7804257549edb4a7ba15999cbb5.diff L

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -376,6 +376,24 @@ let SMETargetGuard = "sme2" in { // Outer product and accumulate/subtract // +multiclass MOP4 checks> { + def NAME # "_1x1" : Inst<"svmop4" # name # "_1x1_" # n # "[_{d}_{d}]", "vidd", t, MergeNone, i # wide # "_1x1", [IsInOutZA, IsStreaming], checks>; -

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -37,63 +37,78 @@ using namespace llvm; namespace cir { namespace direct { -class CIRAttrToValue : public CirAttrVisitor { +class CIRAttrToValue { public: CIRAttrToValue(mlir::Operation *parentOp, mlir::ConversionPatternRewriter &rewriter,

[clang] Reapply "[clang][HIP] Make some math not not work with AMDGCN SPIR-V #128360" (PR #129306)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Alex Voicu (AlexVlx) Changes This reapplies #128360, the only change being that the modified tests also checks for the availability of the SPIRV target. --- Patch is 183.47 KiB, truncated to 20.00 KiB below, full version: https://

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -733,16 +733,17 @@ ENVIRONMENT .. envvar:: CPATH - If this environment variable is present, it is treated as a delimited list of - paths to be added to the default system include path list. The delimiter is - the platform dependent delimiter, as used in the PATH environ

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-28 Thread Eli Friedman via cfe-commits
@@ -51,18 +51,18 @@ namespace disabled_dtor { union disable_dtor { T val; template -disable_dtor(U &&...u) : val(forward(u)...) {} +disable_dtor(U &&...u) : val(forward(u)...) {} // expected-error {{attempt to use a deleted function}} efriedm

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-28 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,48 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s + +namespace t1{ +template struct VSX { + ~VSX() { static_assert(sizeof(T) != 4, ""); } // expected-error {{static assertion failed due to requirement 'sizeof(int) != 4':}} \ +

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-28 Thread Eli Friedman via cfe-commits
@@ -5451,10 +5451,31 @@ bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, NumInitializers * sizeof(CXXCtorInitializer*)); Constructor->setCtorInitializers(baseOrMemberInitializers); +SourceLocation Location = Constructor->getLo

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-28 Thread Teresa Johnson via cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } + if (Sanitize.needsMemProfRt()) +if (hasExportSymbolDirective(Args)) + addExportedSymbol(CmdArgs, "___memprof_default_options_str"); teresajohnson wrote:

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Improve the diagnostics for chained comparisons to report actual expressions and operators Fixes #129069 --- Full diff: https://github.com/llvm/llvm-project/pull/129285.diff 9 Files Affected: - (modif

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/129116 >From ed0cf3f026e439288f8334f27555ad26825fd56a Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 27 Feb 2025 21:49:32 +0100 Subject: [PATCH 1/4] [Clang][diagnostics] Fix structured binding shadows tem

[clang] Revert "[clang][HIP] Make some math not not work with AMDGCN SPIR-V" (PR #129280)

2025-02-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/129280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Remove Last Traces of User Interrupts (PR #129300)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Sam Elliott (lenary) Changes These were left over from when Craig removed `__attribute__((interrupt("user")))` support in 05d0caef6081e1a6cb23a5a5afe43dc82e8ca558. The tests change "interrupt"="user" into "interrupt"="machine" a

[clang] [llvm] [RISCV] Remove Last Traces of User Interrupts (PR #129300)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sam Elliott (lenary) Changes These were left over from when Craig removed `__attribute__((interrupt("user")))` support in 05d0caef6081e1a6cb23a5a5afe43dc82e8ca558. The tests change "interrupt"="user" into "interrupt"="machine" as they ar

[clang] [CodeGen] Ensure relative vtables use llvm.type.checked.load.relative (PR #126785)

2025-02-28 Thread via cfe-commits
https://github.com/PiJoules closed https://github.com/llvm/llvm-project/pull/126785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 23efe73 - [HLSL] Add "or" intrinsic (#128979)

2025-02-28 Thread via cfe-commits
Author: metkarpoonam Date: 2025-02-28T13:54:13-07:00 New Revision: 23efe734fc27544b473ad60ea6eecbd2ec66d20c URL: https://github.com/llvm/llvm-project/commit/23efe734fc27544b473ad60ea6eecbd2ec66d20c DIFF: https://github.com/llvm/llvm-project/commit/23efe734fc27544b473ad60ea6eecbd2ec66d20c.diff

[clang] [HLSL] Add "or" intrinsic (PR #128979)

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

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-02-28 Thread Tom Honermann via cfe-commits
@@ -733,16 +733,17 @@ ENVIRONMENT .. envvar:: CPATH - If this environment variable is present, it is treated as a delimited list of - paths to be added to the default system include path list. The delimiter is - the platform dependent delimiter, as used in the PATH environ

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes The previously upstreamed lowering from ClangIR to LLVM IR diverged from the incubator implementation, but when the incubator was updated to incorporate these changes some issues arose which require the up

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-28 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/127430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/129334 Add additional overloads for min and max to support min(vector, T) and min(T, vector) max(vector, T) and max(T, vector) Add tests Closes #128231 >From ebaef38c40cba83d4b446a5320d57c86038f8286 Mon Sep 17 00:00:00

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Sarah Spall (spall) Changes Add additional overloads for min and max to support min(vector, T) and min(T, vector) max(vector, T) and max(T, vector) Add tests Closes #128231 --- Patch is 29.15 KiB, truncated to 2

[clang] [Clang] Treat constexpr-unknown value as invalid in `EvaluateAsInitializer` (PR #128409)

2025-02-28 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I get that we are allowing constexpr unknown values into codegen and that is a mistake but I don't totally follow the fix. Can you go into more details? If I am reading the code correctly there should be some constexpr cases that generate a diagnostic, can

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Joshua Batista via cfe-commits
@@ -1678,6 +1678,30 @@ half3 max(half3, half3); _HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) _HLSL_BUILTIN_ALIAS(__builtin_elementwise_max) half4 max(half4, half4); +_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) +constexpr half2 max(half2 p0, half p1) { bob80905 wro

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Sarah Spall via cfe-commits
@@ -1678,6 +1678,30 @@ half3 max(half3, half3); _HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) _HLSL_BUILTIN_ALIAS(__builtin_elementwise_max) half4 max(half4, half4); +_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) +constexpr half2 max(half2 p0, half p1) { spall wrote:

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Sarah Spall via cfe-commits
@@ -1678,6 +1678,30 @@ half3 max(half3, half3); _HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) _HLSL_BUILTIN_ALIAS(__builtin_elementwise_max) half4 max(half4, half4); +_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2) +constexpr half2 max(half2 p0, half p1) { spall wrote:

[clang] [HLSL] Add additional overloads for min and max to allow for mixed scalar and vector arguments (PR #129334)

2025-02-28 Thread Sarah Spall via cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/129334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-02-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/129304 This change adds support for floating point literal expressions >From d13f2d0d40987302243efad7304a1a006fdb2dde Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 28 Feb 2025 21:42:36 +0100 Subject: [PA

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes This change adds support for floating point literal expressions --- Full diff: https://github.com/llvm/llvm-project/pull/129304.diff 2 Files Affected: - (modified) clang/lib

[clang] d9edca4 - [CodeGen] Ensure relative vtables use llvm.type.checked.load.relative (#126785)

2025-02-28 Thread via cfe-commits
Author: PiJoules Date: 2025-02-28T12:26:29-08:00 New Revision: d9edca4fe05245ace93f7f1577a2eb79ec6898b1 URL: https://github.com/llvm/llvm-project/commit/d9edca4fe05245ace93f7f1577a2eb79ec6898b1 DIFF: https://github.com/llvm/llvm-project/commit/d9edca4fe05245ace93f7f1577a2eb79ec6898b1.diff LOG:

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

2025-02-28 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 879ef53b6a79f649dd1854c50d55cd6798a06dec Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [Sema] Instantiate destructors for initialized anonymous union fields (PR #128866)

2025-02-28 Thread Eli Friedman via cfe-commits
@@ -5451,10 +5451,23 @@ bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, NumInitializers * sizeof(CXXCtorInitializer*)); Constructor->setCtorInitializers(baseOrMemberInitializers); +SourceLocation Location = Constructor->getLo

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

2025-02-28 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/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] Add `pragma clang scope [push|pop]` (PR #121025)

2025-02-28 Thread Michael Spencer via cfe-commits
@@ -254,7 +285,7 @@ void Preprocessor::updateModuleMacroInfo(const IdentifierInfo *II, } void Preprocessor::dumpMacroInfo(const IdentifierInfo *II) { - ArrayRef Leaf; + ArrayRef Leaf; Bigcheese wrote: This patch has a bunch of unrelated formatting changes,

[clang] Add `pragma clang scope [push|pop]` (PR #121025)

2025-02-28 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Given that some `#pragma`s also impact Sema things, I think `scope` is a bit confusing for what it applies to. I think something like `macro_scope` would be a better name. As for the extension itself, I think it could be useful, but I'm not sure how our language extension pol

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-28 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %check_clang_tidy %s readability-use-numeric-limits %t +#include + +void constants() { + // CHECK-MESSAGES: :[[@LINE+2]]:14: warning: The constant -128 is being utilized. Consider using std::numeric_limits::min() instead [readability-use-numeric-limit

[clang] [Clang] Treat constexpr-unknown value as invalid in `EvaluateAsInitializer` (PR #128409)

2025-02-28 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Here's a testcase that's should generate a diagnostic, but doesn't without this patch: ``` int &ff(); int &x = ff(); constinit int &z = x; ``` Some related testcases are a little weird... consider the following: ``` extern int &x; int &z = x; ``` There's a gap between ch

[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

2025-02-28 Thread Michael Flanders via cfe-commits
https://github.com/Flandini edited https://github.com/llvm/llvm-project/pull/127702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix fp8-init-list.c test failure (PR #129259)

2025-02-28 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/129259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-28 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/128979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -37,63 +37,78 @@ using namespace llvm; namespace cir { namespace direct { -class CIRAttrToValue : public CirAttrVisitor { +class CIRAttrToValue { public: CIRAttrToValue(mlir::Operation *parentOp, mlir::ConversionPatternRewriter &rewriter,

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-28 Thread Richard Smith via cfe-commits
zygoloid wrote: > > 2. Create check that forbids usage of true/false in processor as an > > non-portable thing (could be in portability category) > > 3. Extracting 'true' case from -Wundef into separate warning like > > -Wundef-true > > I like both of these approaches, though I prefer the 2. o

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-28 Thread Richard Smith via cfe-commits
zygoloid wrote: Perhaps we could split off a warning from `-Wundef` for the specific case where the undefined macro name is `true`, and enable it by default? Doing this in a clang-tidy check seems like the wrong place -- this check is much better suited to being implemented as a compiler warni

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-28 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt closed https://github.com/llvm/llvm-project/pull/128979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-28 Thread Richard Smith via cfe-commits
zygoloid wrote: > 1. Not adding check if -Wundef is sufficient > 2. Create check that forbids usage of true/false in processor as an > non-portable thing (could be in portability category) > 3. Extracting 'true' case from -Wundef into separate warning like -Wundef-true Option 3 seems best to me

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: choikwa (choikwa) Changes …__builtin_scalbn Clang generates library calls for __builtin_* functions which can be a problem for GPUs that cannot handle them. This patch generates call to device implement

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-02-28 Thread via cfe-commits
https://github.com/choikwa edited https://github.com/llvm/llvm-project/pull/129347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >