[clang] [llvm] [HLSL][SPIR-V] Add hlsl_private address space for SPIR-V (PR #133464)

2025-04-09 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/133464 From 12524667594d413c93a2c88a206a930cff638da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Thu, 28 Nov 2024 15:00:56 +0100 Subject: [PATCH 1/5] [SPIR-V] Add hlsl_private address space for

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: cir-opt %s | FileCheck %s + +!s32i = !cir.int erichkeane wrote: what is this doing? I dont really see it in the check or definition lines. https://github.com/llvm/llvm-project/pull/135105 ___

[clang] [clang-format] Keep the space between `not` and a unary operator (PR #135035)

2025-04-09 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick f34483838937b1a01ee11ee22bdd6e13c81e9fff https://github.com/llvm/llvm-project/pull/135035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-09 Thread via cfe-commits
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dyn_cast(SubExpr

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/135013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] [Sema] Make -Wreturn-type an error by default (PR #131207)

2025-04-09 Thread via cfe-commits
Sirraide wrote: Aaron and I talked about this for a while, and I’ve now posted an RFC about this subject: https://github.com/llvm/llvm-project/pull/131207 ___ cfe-commits

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-09 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo edited https://github.com/llvm/llvm-project/pull/133910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make it possible to assign an array from a cbuffer (PR #134174)

2025-04-09 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/134174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Respect -fwrapv-pointer when emitting struct GEPs (PR #134269)

2025-04-09 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw closed https://github.com/llvm/llvm-project/pull/134269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Fix an unused variable warning (PR #135046)

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

[clang] c048073 - [Clang][CodeGen] Respect -fwrapv-pointer when emitting struct GEPs (#134269)

2025-04-09 Thread via cfe-commits
Author: Yingwei Zheng Date: 2025-04-10T00:48:18+08:00 New Revision: c0480738cb3f4b2db47b77f5b18f9819cb995373 URL: https://github.com/llvm/llvm-project/commit/c0480738cb3f4b2db47b77f5b18f9819cb995373 DIFF: https://github.com/llvm/llvm-project/commit/c0480738cb3f4b2db47b77f5b18f9819cb995373.diff

[clang] [compiler-rt] [libc] [libcxx] [llvm] [AMDGPU] Fix code object verion not being set to 'none' (PR #135036)

2025-04-09 Thread via cfe-commits
https://github.com/ronlieb approved this pull request. https://github.com/llvm/llvm-project/pull/135036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-09 Thread via cfe-commits
https://github.com/MillePlateaux edited https://github.com/llvm/llvm-project/pull/134465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Respect -fwrapv-pointer when emitting struct GEPs (PR #134269)

2025-04-09 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

2025-04-09 Thread Paul Walker via cfe-commits
@@ -1492,9 +1492,17 @@ static bool isAllActivePredicate(Value *Pred) { if (cast(Pred->getType())->getMinNumElements() <= cast(UncastedPred->getType())->getMinNumElements()) Pred = UncastedPred; + if (match(Pred, m_Intrinsic( + m_ConstantI

[libclc] [libclc] Move fmin & fmax to CLC library (PR #134218)

2025-04-09 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: ping https://github.com/llvm/llvm-project/pull/134218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-09 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/134673 >From 6995ca5f0ecd34a9f1c2e28de93d0b555264de25 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Tue, 8 Apr 2025 22:54:24 +0800 Subject: [PATCH] [CIR] Upstream initial function call support --- .../CIR/Dialect/Bui

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-04-09 Thread Mészáros Gergely via cfe-commits
@@ -10685,6 +10724,7 @@ QualType Sema::CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS, if (compType.isNull() || !compType->isArithmeticType()) return InvalidOperands(Loc, LHS, RHS); if (IsDiv) { +DetectPrecisionLossInComplexDivision(*this, RHS.get()->

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

2025-04-09 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions c,cpp -- clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_S

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-09 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/Sema/SemaDeclAttr.cpp clang/test/SemaCXX/al

[clang] [llvm] Reapply "Inline: Propagate callsite nofpclass attribute" (PR #135018)

2025-04-09 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/135018 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "Inline: Propagate callsite nofpclass attribute" (PR #135018)

2025-04-09 Thread Matt Arsenault via cfe-commits
arsenm wrote: * **#135018** https://app.graphite.dev/github/pr/llvm/llvm-project/135018?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/13501

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-09 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Note, I filed an issue about the duplicate diagnostics at https://github.com/llvm/llvm-project/issues/135012 https://github.com/llvm/llvm-project/pull/135013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-09 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/134362 >From 7db1cca2ad76b249d1fa2b76e6c488aa41cb3582 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Fri, 4 Apr 2025 06:10:56 -0400 Subject: [PATCH 1/7] [driver] Generalize adding the path of libflang_rt.runtime

[clang] [compiler-rt] [libc] [libcxx] [llvm] [AMDGPU] Fix code object version not being set to 'none' (PR #135036)

2025-04-09 Thread Jay Foad via cfe-commits
https://github.com/jayfoad edited https://github.com/llvm/llvm-project/pull/135036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libc] [libcxx] [llvm] [AMDGPU] Fix code object version not being set to 'none' (PR #135036)

2025-04-09 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/135036 >From e41985970c254f3eda71cb5ef3a1dc321c8e6f56 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 9 Apr 2025 09:41:38 -0500 Subject: [PATCH 1/2] [AMDGPU] Fix code object verion not being set to 'none' Summa

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matthew Devereau (MDevereau) Changes SVE Operations such as predicated loads become canonicalized to LLVM masked loads, and doing the same for ptrue(all) to splat(1) creates further optimization opportunities from generic LLVM IR passes.

[clang] 68ee56d - [clang][OpenMP][SPIR-V] Fix addrspace of global constants (#134399)

2025-04-09 Thread via cfe-commits
Author: Nick Sarnie Date: 2025-04-09T15:41:53Z New Revision: 68ee56d15020b4fa7f3c5443b4be6504481957d4 URL: https://github.com/llvm/llvm-project/commit/68ee56d15020b4fa7f3c5443b4be6504481957d4 DIFF: https://github.com/llvm/llvm-project/commit/68ee56d15020b4fa7f3c5443b4be6504481957d4.diff LOG: [

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of global constants (PR #134399)

2025-04-09 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/134399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libc] [libcxx] [llvm] [AMDGPU] Fix code object version not being set to 'none' (PR #135036)

2025-04-09 Thread Matt Arsenault via cfe-commits
@@ -62,7 +62,7 @@ Value *EmitAMDGPUWorkGroupSize(CodeGenFunction &CGF, unsigned Index) { auto Cov = CGF.getTarget().getTargetOpts().CodeObjectVersion; - if (Cov == CodeObjectVersionKind::COV_None) { + if (Cov == CodeObjectVersionKind::COV_None && !CGF.getLangOpts().OpenM

[clang] 12b1ed2 - [Clang] Add non static data member initializer for BindingDecl member Decomp (#134969)

2025-04-09 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2025-04-09T13:31:52-07:00 New Revision: 12b1ed213ec55750e8fd59dfa44f6872186ed709 URL: https://github.com/llvm/llvm-project/commit/12b1ed213ec55750e8fd59dfa44f6872186ed709 DIFF: https://github.com/llvm/llvm-project/commit/12b1ed213ec55750e8fd59dfa44f6872186ed709.dif

[clang] [Clang] Add non static data member initializer for BindingDecl member Decomp (PR #134969)

2025-04-09 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/134969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 505a7e7 - [OpenACC][CIR] Support for `init` and `shutdown` lowering

2025-04-09 Thread via cfe-commits
Author: erichkeane Date: 2025-04-09T11:22:35-07:00 New Revision: 505a7e7d1cd2b77ab67ef82ac4abc9cf94271adb URL: https://github.com/llvm/llvm-project/commit/505a7e7d1cd2b77ab67ef82ac4abc9cf94271adb DIFF: https://github.com/llvm/llvm-project/commit/505a7e7d1cd2b77ab67ef82ac4abc9cf94271adb.diff LO

[clang] [llvm] Extend jump-threading to allow live local defs (PR #135079)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: None (LU-JOHN) Changes Extend jump-threading to allow local defs that are live outside of the threaded block. Allow threading to destinations where the local defs are not live. --- Patch is 127.83 KiB, truncated to 20.00 KiB b

[clang] 543e5f5 - Fix crash with align_value diagnostic reporting (#135013)

2025-04-09 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-04-09T12:39:03-04:00 New Revision: 543e5f5842fe576bb8752f04345b2cc995e5bb50 URL: https://github.com/llvm/llvm-project/commit/543e5f5842fe576bb8752f04345b2cc995e5bb50 DIFF: https://github.com/llvm/llvm-project/commit/543e5f5842fe576bb8752f04345b2cc995e5bb50.diff

[clang] [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (PR #134951)

2025-04-09 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak ready_for_review https://github.com/llvm/llvm-project/pull/134951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c8d49e9 - [alpha.webkit.RetainPtrCtorAdoptChecker] Recognize mutableCopy from literal as +1 (#132350)

2025-04-09 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-04-09T10:33:08-07:00 New Revision: c8d49e9dd2e7e4c64a0a70bf05b0e6c83b04841a URL: https://github.com/llvm/llvm-project/commit/c8d49e9dd2e7e4c64a0a70bf05b0e6c83b04841a DIFF: https://github.com/llvm/llvm-project/commit/c8d49e9dd2e7e4c64a0a70bf05b0e6c83b04841a.diff

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

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

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-09 Thread Bruno Cardoso Lopes via cfe-commits
@@ -304,6 +305,102 @@ RValue CIRGenFunction::emitAnyExpr(const Expr *e) { llvm_unreachable("bad evaluation kind"); } +static cir::FuncOp emitFunctionDeclPointer(CIRGenModule &cgm, GlobalDecl gd) { + assert(!cir::MissingFeatures::weakRefReference()); + return cgm.getAddrOfF

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Amr Hesham via cfe-commits
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [CIR] Upstream initial function call support (PR #134673)

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

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-09 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: cir-opt %s | FileCheck %s + bcardosolopes wrote: Not a review item, more like a general "it will be nice comment": `mlir-opt` has a `--verify-roundtrip` flag, which we should add at some point to `cir-opt` to make such testings even mo

[clang] [clang] Allow parentheses around CTAD declarators (PR #132829)

2025-04-09 Thread via cfe-commits
offsetof wrote: Yes please, thank you @cor3ntin https://github.com/llvm/llvm-project/pull/132829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Upstream LValueBaseInfo handling (PR #134928)

2025-04-09 Thread Amr Hesham via cfe-commits
@@ -27,7 +27,8 @@ using namespace cir; /// Given an expression of pointer type, try to /// derive a more accurate bound on the alignment of the pointer. -Address CIRGenFunction::emitPointerWithAlignment(const Expr *expr) { +Address CIRGenFunction::emitPointerWithAlignment(cons

[clang] [CIR][NFC] Fix an unused variable warning (PR #135046)

2025-04-09 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM. Btw I started seeing tons of these in the incubator since my latest macOS update too, will do a round of cleanup there as well https://github.com/llvm/llvm-project/pull/135046 ___ cfe-

[clang] [Clang][AMDGPU] Accept builtins in lambda declarations (PR #135027)

2025-04-09 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: LGTM. Pls address other comments https://github.com/llvm/llvm-project/pull/135027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-09 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1342,6 +1342,47 @@ def FuncOp : CIR_Op<"func", [ let hasVerifier = 1; } +//===--===// +// CallOp +//===--===// + +class CIR_CallOpBase

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-04-09 Thread via cfe-commits
@@ -12155,16 +12185,16 @@ static ClassTemplateDecl *LookupStdInitializerList(Sema &S, SourceLocation Loc){ Result.suppressDiagnostics(); // We found something weird. Complain about the first thing we found. NamedDecl *Found = *Result.begin(); -S.Diag(Found->get

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-09 Thread Bruno Cardoso Lopes via cfe-commits
@@ -304,6 +305,102 @@ RValue CIRGenFunction::emitAnyExpr(const Expr *e) { llvm_unreachable("bad evaluation kind"); } +static cir::FuncOp emitFunctionDeclPointer(CIRGenModule &cgm, GlobalDecl gd) { + assert(!cir::MissingFeatures::weakRefReference()); + return cgm.getAddrOfF

[clang] [CIR] Upstream initial function call support (PR #134673)

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

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-09 Thread Deric C. via cfe-commits
@@ -0,0 +1,34 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s ---

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Bruno Cardoso Lopes via cfe-commits
@@ -29,8 +29,15 @@ int f[5] = {1, 2}; void func() { int arr[10]; - // CHECK: %[[ARR:.*]] = cir.alloca !cir.array, !cir.ptr>, ["arr"] + + int e = arr[1]; + // CHECK: %[[INIT:.*]] = cir.alloca !s32i, !cir.ptr, ["e", init] + // CHECK: %[[IDX:.*]] = cir.const #cir.int<1>

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-04-09 Thread Dan Liew via cfe-commits
@@ -186,4 +218,188 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +static void EmitIncompleteCountedByPointeeNotes(Sema &S, +const CountAttributedType *CATy, +

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread Alexey Bataev via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [Clang][AMDGPU] Accept builtins in lambda declarations (PR #135027)

2025-04-09 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,24 @@ +// REQUIRES: amdgpu-registered-target arsenm wrote: -emit-llvm should work fine, real codegen will obviously fail https://github.com/llvm/llvm-project/pull/135027 ___ cfe-commits mailing list cfe-com

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-09 Thread David Green via cfe-commits
https://github.com/davemgreen created https://github.com/llvm/llvm-project/pull/135064 The aim here is to avoid a ptrtoint->inttoptr round-trip through the function argument whilst keeping the calling convention the same. Given a struct which is <= 128bits in size, which can only contain either

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-04-09 Thread Mészáros Gergely via cfe-commits
@@ -10685,6 +10724,7 @@ QualType Sema::CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS, if (compType.isNull() || !compType->isArithmeticType()) return InvalidOperands(Loc, LHS, RHS); if (IsDiv) { +DetectPrecisionLossInComplexDivision(*this, RHS.get()->

[clang] clang/AMDGPU: Stop looking for oclc_daz_opt_* control libraries (PR #134805)

2025-04-09 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/134805 >From 239a55f25f7afecef3513788e8c2428fb2a06c22 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 8 Apr 2025 15:03:22 +0700 Subject: [PATCH] clang/AMDGPU: Stop looking for oclc_daz_opt_* control libraries

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Nathan Lanza via cfe-commits
@@ -29,8 +29,15 @@ int f[5] = {1, 2}; void func() { int arr[10]; - // CHECK: %[[ARR:.*]] = cir.alloca !cir.array, !cir.ptr>, ["arr"] + + int e = arr[1]; + // CHECK: %[[INIT:.*]] = cir.alloca !s32i, !cir.ptr, ["e", init] + // CHECK: %[[IDX:.*]] = cir.const #cir.int<1>

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Green (davemgreen) Changes The aim here is to avoid a ptrtoint->inttoptr round-trip through the function argument whilst keeping the calling convention the same. Given a struct which is <= 128bits in size, which can only contain eithe

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: David Green (davemgreen) Changes The aim here is to avoid a ptrtoint->inttoptr round-trip through the function argument whilst keeping the calling convention the same. Given a struct which is <= 128bits in size, which can only con

[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

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

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-04-09 Thread Deric C. via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/131070 >From 81196e016dbf1209637dd13315efff7eac461d42 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Fri, 14 Mar 2025 00:24:26 + Subject: [PATCH 1/7] Implement ResMayNotAlias DXIL shader flag analysis --- clang

[clang] [CIR][NFC] Upstream LValueBaseInfo handling (PR #134928)

2025-04-09 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Ship it! https://github.com/llvm/llvm-project/pull/134928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3ef2bb6 - [HLSL] Implement the dst HLSL Function (#133828)

2025-04-09 Thread via cfe-commits
Author: metkarpoonam Date: 2025-04-09T12:25:37-06:00 New Revision: 3ef2bb6d0bcfcdcfde72d8aa3354e72c2366e22b URL: https://github.com/llvm/llvm-project/commit/3ef2bb6d0bcfcdcfde72d8aa3354e72c2366e22b DIFF: https://github.com/llvm/llvm-project/commit/3ef2bb6d0bcfcdcfde72d8aa3354e72c2366e22b.diff

[clang] [clang][docs] Fix example in likely/unlikely attr documentation (PR #126372)

2025-04-09 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Hmm, I think what this section is trying to demonstrate is that ‘_According > to the standard_, this is in the path of execution and therefore _supposed_ > to be considered unlikely, but we don’t do that’, so maybe it’d be better to > reword/expand the comment instead? T

[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

2025-04-09 Thread Ashley Coleman via cfe-commits
@@ -174,6 +174,31 @@ const inline float distance(__detail::HLSL_FIXED_VECTOR X, __detail::HLSL_FIXED_VECTOR Y) { return __detail::distance_vec_impl(X, Y); } +//===--===// +// dst

[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

2025-04-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/17984 Here is th

[clang] [clang] fix NestedNameSpecifier dependency calculation (PR #135067)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes A NestedNameSpecifier of TypeSpec kind can be non-dependent even if its prefix is dependent, when for example the prefix is an injected class type but the type itself is a simple alias to a non-dependent

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Aaron Ballman via cfe-commits
@@ -151,3 +151,21 @@ class C { // expected-error {{unexpected ';' before ')'}} }; } + +#if __cplusplus >= 201103L +namespace GH23317 { +struct A { AaronBallman wrote: Yup, that still compiles without diagnosing. https://github.com/llvm

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-04-09 Thread Mateusz Mikuła via cfe-commits
https://github.com/mati865 ready_for_review https://github.com/llvm/llvm-project/pull/134494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.RetainPtrCtorAdoptChecker] Support adopt(cast(copy(~)) (PR #132316)

2025-04-09 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/132316 >From 642057c409b1c3b98ee4ecb16e95b5fb5be47a01 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 20 Mar 2025 17:54:22 -0700 Subject: [PATCH 1/3] [alpha.webkit.RetainPtrCtorAdoptChecker] Support adopt(cast(co

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-04-09 Thread via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-llvm-support Author: Mateusz Mikuła (mati865) Changes With these changes, LLVM and Clang become buildable for Cy

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-09 Thread Finn Plummer via cfe-commits
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_UAV || CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = Cu

[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

2025-04-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/15721 Here is the relevant piece of the

[clang] [clang] fix NestedNameSpecifier dependency calculation (PR #135067)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135067 A NestedNameSpecifier of TypeSpec kind can be non-dependent even if its prefix is dependent, when for example the prefix is an injected class type but the type itself is a simple alias to a non-dependent type.

[clang] [alpha.webkit.UnretainedLambdaCapturesChecker] Add the support for protectedSelf (PR #132518)

2025-04-09 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/132518 ___ 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] improved preservation of template keyword (PR #133610)

2025-04-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @alexfh the last one will be fixed here: https://github.com/llvm/llvm-project/pull/135067 https://github.com/llvm/llvm-project/pull/133610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Aaron Ballman via cfe-commits
@@ -5585,6 +5585,18 @@ SourceRange EnumConstantDecl::getSourceRange() const { return SourceRange(getLocation(), End); } +bool EnumConstantDecl::isOutOfLine() const { + if (Decl::isOutOfLine()) +return true; + + // In C++, if the enumeration is out of line, the enumerat

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-09 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AMDGPU] Generalize global.load.lds to buffer fat pointers (PR #134911)

2025-04-09 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 updated https://github.com/llvm/llvm-project/pull/134911 >From 976aa3b4528b93bbf9e8deb433be143d45cfbad6 Mon Sep 17 00:00:00 2001 From: Krzysztof Drewniak Date: Tue, 8 Apr 2025 19:10:41 + Subject: [PATCH 1/2] [AMDGPU] Generalize global.load.lds to buffer fat poin

[clang] [alpha.webkit.UnretainedLambdaCapturesChecker] Add the support for protectedSelf (PR #132518)

2025-04-09 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/132518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2c31403 - [alpha.webkit.UnretainedLambdaCapturesChecker] Add the support for protectedSelf (#132518)

2025-04-09 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-04-09T11:52:36-07:00 New Revision: 2c31403f4f301214cb87e929c4d032bd2f4617f4 URL: https://github.com/llvm/llvm-project/commit/2c31403f4f301214cb87e929c4d032bd2f4617f4 DIFF: https://github.com/llvm/llvm-project/commit/2c31403f4f301214cb87e929c4d032bd2f4617f4.diff

[clang] [alpha.webkit.UnretainedLambdaCapturesChecker] Add the support for protectedSelf (PR #132518)

2025-04-09 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/132518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-09 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/133800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-09 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/133800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-04-09 Thread via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: @@ -29,7 +29,6 @@ #ifdef __CYGWIN__ #include #include -#define _WIN32 1 #endif jeremyd2019 wrote: I'd bet you could

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Aaron Ballman via cfe-commits
@@ -5585,6 +5585,18 @@ SourceRange EnumConstantDecl::getSourceRange() const { return SourceRange(getLocation(), End); } +bool EnumConstantDecl::isOutOfLine() const { + if (Decl::isOutOfLine()) +return true; + + // In C++, if the enumeration is out of line, the enumerat

[clang-tools-extra] [clang-tidy] Avoid diagnosing std::array initializations for modernize-use-designated-initializers (PR #134774)

2025-04-09 Thread Carlos Galvez via cfe-commits
@@ -119,13 +119,18 @@ UseDesignatedInitializersCheck::UseDesignatedInitializersCheck( void UseDesignatedInitializersCheck::registerMatchers(MatchFinder *Finder) { const auto HasBaseWithFields = hasAnyBase(hasType(cxxRecordDecl(has(fieldDecl(); + + // see #133715 +

[clang] [llvm] [mlir] [AMDGPU] Generalize global.load.lds to buffer fat pointers (PR #134911)

2025-04-09 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 edited https://github.com/llvm/llvm-project/pull/134911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Avoid diagnosing std::array initializations for modernize-use-designated-initializers (PR #134774)

2025-04-09 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Ok, I see, let's disable for ::std::array then, generalize in the future if we come across a similar use case. https://github.com/llvm/llvm-project/pull/134774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] fe2eefc - [clang][index] Handle undefined function-like macros in single file parse mode (#135054)

2025-04-09 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-04-09T13:00:17-07:00 New Revision: fe2eefc4718f57e1753f7bd51c158fc03d70b34f URL: https://github.com/llvm/llvm-project/commit/fe2eefc4718f57e1753f7bd51c158fc03d70b34f DIFF: https://github.com/llvm/llvm-project/commit/fe2eefc4718f57e1753f7bd51c158fc03d70b34f.diff L

[clang] [CIR][NFC] Upstream LValueBaseInfo handling (PR #134928)

2025-04-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/134928 >From e9b227dac39b962f62cf111db6898a3a66ee70aa Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 8 Apr 2025 10:03:08 -0700 Subject: [PATCH] [CIR][NFC] Upstream LValueBaseInfo handling Previous implementa

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-09 Thread Deric C. via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/134288 >From c482c96c99ab76458904b3f94b1146ccfee0f55c Mon Sep 17 00:00:00 2001 From: Icohedron Date: Wed, 2 Apr 2025 21:16:16 + Subject: [PATCH 1/8] Add test for UseNativeLowPrecision shader flag --- .../Shader

[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -47,6 +47,31 @@ void f() { #endif } // namespace cwg2813 +namespace cwg2815 { // cwg2815: 21 +#if __cplusplus >= 201703L +int arg() noexcept; + +int f(int (&)() noexcept); +void f(int (&)()); +int i = f(arg); + +int g(int (*)() noexcept); +void g(int (&)()); +int j = g(arg)

[clang] [CXX Safe Buffer] Update the documentation for unsafe_buffer_usage attribute (PR #135087)

2025-04-09 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/135087 >From edbdfa66b45be76014f003f8e2d6f2d2871ea253 Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Wed, 9 Apr 2025 14:31:06 -0700 Subject: [PATCH] Update the documentation for the unsafe_buffer_usage attri

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

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

[clang] [clang] fix NestedNameSpecifier dependency calculation (PR #135067)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/135067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage][NFC] Factor out FixitUtil (PR #135100)

2025-04-09 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple created https://github.com/llvm/llvm-project/pull/135100 None >From 6ff5dc6b405cdae156d213d77e21ad9a14162270 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Wed, 9 Apr 2025 13:48:39 -0700 Subject: [PATCH] [-Wunsafe-buffer-usage][NFC] Factor out FixitUtil ---

[clang] [-Wunsafe-buffer-usage][NFC] Factor out FixitUtil (PR #135100)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Korous (jkorous-apple) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135100.diff 4 Files Affected: - (added) clang/include/clang/Analysis/Support/FixitUtil.h (+73) - (modified) clang/lib/Analysis/CMakeLists.txt

<    1   2   3   4   5   >