[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-02 Thread Oliver Hunt via cfe-commits
@@ -1586,8 +1597,22 @@ bool CoroutineStmtBuilder::makeNewAndDeleteExpr() { if (NewRef.isInvalid()) return false; - SmallVector NewArgs(1, FrameSize); - if (S.getLangOpts().CoroAlignedAllocation && PassAlignment) + SmallVector NewArgs; + if (IAP.PassTypeIdentity) { +

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-02 Thread Oliver Hunt via cfe-commits
@@ -3096,6 +3096,29 @@ bool Type::isStdByteType() const { return false; } +TemplateDecl *Type::getSpecializedTemplateDecl() const { + const auto *DesugaredType = getUnqualifiedDesugaredType(); + if (auto *Specialization = DesugaredType->getAs()) +return Specialization

[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: And I think this should follow the same approach in https://github.com/llvm/llvm-project/pull/132320 https://github.com/llvm/llvm-project/pull/133878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-02 Thread Urvi Rav via cfe-commits
https://github.com/ravurvi20 updated https://github.com/llvm/llvm-project/pull/128640 >From 6ebd5991788608fbd104ea9c23230912044462d3 Mon Sep 17 00:00:00 2001 From: Urvi Rav Date: Tue, 25 Feb 2025 00:49:07 -0600 Subject: [PATCH 1/3] default clause replaced by otherwise clause for metadirective

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-02 Thread Oliver Hunt via cfe-commits
@@ -1095,12 +1095,40 @@ static TypeSourceInfo *getTypeSourceInfoForStdAlignValT(Sema &S, return S.Context.getTrivialTypeSourceInfo(StdAlignValDecl); } +// When searching for custom allocators on the PromiseType we want to +// warn that we will ignore type aware allocators.

[clang] [Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (PR #132348)

2025-04-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve2-vla-2stage` running on `linaro-g4-02` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/199/builds/2528 Here is the relevant piece

[clang] 5d36448 - [flang][OpenMP] Upstream first part of `do concurrent` mapping (#126026)

2025-04-02 Thread via cfe-commits
Author: Kareem Ergawy Date: 2025-04-02T09:24:38+02:00 New Revision: 5d364481e36871584affa54c58a803a936b9a5d6 URL: https://github.com/llvm/llvm-project/commit/5d364481e36871584affa54c58a803a936b9a5d6 DIFF: https://github.com/llvm/llvm-project/commit/5d364481e36871584affa54c58a803a936b9a5d6.diff

[clang] [MS][clang] Make sure vector deleting dtor calls correct operator delete (PR #133950)

2025-04-02 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/133950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-02 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/133878 >From 3a3dea21957b70dfedc4eab47be0c1717ff0a229 Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Tue, 1 Apr 2025 00:51:11 -0700 Subject: [PATCH 1/2] fixed clang frontend crash with friend class declaration and

[clang] Reapply "[Clang] [NFC] Introduce a helper for emitting compatibility diagnostics" (#134036) (PR #134043)

2025-04-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes This reapplies #134036 with a fix to the python bindings tests, reverting https://github.com/llvm/llvm-project/commit/076397ff3217cf45fd08024dd7bcd2bc8fb229ab. --- Patch is 41.69 KiB, truncated to 20.00 KiB below

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-04-02 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/133741 From 41af38793161b0f1535c98c4695c36e081ef2f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 27 Mar 2025 17:46:34 +0100 Subject: [PATCH 1/9] [Clang][AMDGPU] Add

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-04-02 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -729,6 +729,25 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { break; } + case Intrinsic::amdgcn_cvt_off_f32_i4: { +Value* Arg = II.getArgOperand(0); +Type *Ty = II.getType(); + +if (isa(Arg)) + return IC.replaceInst

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited 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] Revert "[Clang] [NFC] Introduce a helper for emitting compatibility diagnostics" (PR #134036)

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

[clang] bd788db - [AMDGPU] Remove detection of hip runtime for Spack (#133263)

2025-04-02 Thread via cfe-commits
Author: Harmen Stoppels Date: 2025-04-02T14:52:27+07:00 New Revision: bd788dbf516be98044254336f54b72d077f69771 URL: https://github.com/llvm/llvm-project/commit/bd788dbf516be98044254336f54b72d077f69771 DIFF: https://github.com/llvm/llvm-project/commit/bd788dbf516be98044254336f54b72d077f69771.dif

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-04-02 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?=

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-04-02 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-04-02 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?=

[clang] [Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (PR #132348)

2025-04-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/14281 Here is the relevant piece o

[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-02 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/133878 >From 289f8630dccf916b8cf7cc43758bae60df036c5d Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Wed, 2 Apr 2025 00:53:33 -0700 Subject: [PATCH 1/2] clang frontend crash with friend class declaration and overl

[clang] Reapply "[Clang] [NFC] Introduce a helper for emitting compatibility diagnostics" (#134036) (PR #134043)

2025-04-02 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/134043 This reapplies #134036 with a fix to the python bindings tests, reverting https://github.com/llvm/llvm-project/commit/076397ff3217cf45fd08024dd7bcd2bc8fb229ab. >From 9a555d4045d933bf838091d6fa25d8ea0be21980 Mo

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

2025-04-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited 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-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: David Rivera (RiverDave) Changes Covered the edge case where an int expression is not necessarily directly wrapped around an ImplicitCastExpr which seemed to be a requirement in this check to trigger. **For instance**: ```cp

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-02 Thread David Rivera via cfe-commits
https://github.com/RiverDave created https://github.com/llvm/llvm-project/pull/134188 Covered the edge case where an int expression is not necessarily directly wrapped around an ImplicitCastExpr which seemed to be a requirement in this check to trigger. **For instance**: ```cpp #include bo

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds ClangIR support for break and continue statements in loops. Because only loops are currently implemented upstream in CIR, only breaks in loops are supported here, but this same code will work (wi

[clang] [Clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/133878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Use llvm::erase_if (NFC) (PR #134017)

2025-04-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/134017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

2025-04-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/133850 >From cd2f6658a1a609edf7471f629b766eb4ee495122 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Sun, 30 Mar 2025 00:59:48 -0400 Subject: [PATCH 1/3] [Clang][Cmake] fix libtool duplicate member name warnings fi

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

2025-04-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/133863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b384d6d - [CodeGen] Don't include CGDebugInfo.h in CodeGenFunction.h (NFC) (#134100)

2025-04-02 Thread via cfe-commits
Author: Nikita Popov Date: 2025-04-03T08:04:19+02:00 New Revision: b384d6d6ccc8f4452cd7086061c657ce76b41224 URL: https://github.com/llvm/llvm-project/commit/b384d6d6ccc8f4452cd7086061c657ce76b41224 DIFF: https://github.com/llvm/llvm-project/commit/b384d6d6ccc8f4452cd7086061c657ce76b41224.diff

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -45,6 +45,14 @@ distance_vec_impl(vector X, vector Y) { return length_vec_impl(X - Y); } +constexpr float dot2add_impl(half2 a, half2 b, float c) { +#if defined(__DIRECTX__) farzonl wrote: Also to answer your question we only need to do one or the other

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] c57b9c2 - [CIR] Generate the nsw flag correctly for unary ops (#133815)

2025-04-02 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-02T15:48:55-07:00 New Revision: c57b9c233a87f37e034445596ed09260cc6b23f5 URL: https://github.com/llvm/llvm-project/commit/c57b9c233a87f37e034445596ed09260cc6b23f5 DIFF: https://github.com/llvm/llvm-project/commit/c57b9c233a87f37e034445596ed09260cc6b23f5.diff L

[clang] [clang-tools-extra] [clang] support pack expansions for trailing requires clauses (PR #133190)

2025-04-02 Thread via cfe-commits
@@ -7379,8 +7378,11 @@ bool ASTContext::isSameEntity(const NamedDecl *X, const NamedDecl *Y) const { return false; } -if (!isSameConstraintExpr(FuncX->getTrailingRequiresClause(), cor3ntin wrote: Can we add an overload, at least + comment? htt

[clang] [clang][NFC] Refactor CodeGen's hasBooleanRepresentation (PR #134159)

2025-04-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/134159 The ClangIR upstreaming project needs the same logic for hasBooleanRepresentation() that is currently implemented in the standard clang codegen. In order to share this code, this change moves the implementat

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/133828 >From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Mon, 31 Mar 2025 16:49:18 -0700 Subject: [PATCH 1/7] Implement a dst function with test cases for HLSL

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] [clang] Fix crash on invalid `std::initializer_list` template-id (PR #132284)

2025-04-02 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132284 >From 553ced1e367c0ec6399e71e7a3a3685a550f3431 Mon Sep 17 00:00:00 2001 From: offsetof Date: Thu, 20 Mar 2025 20:54:45 + Subject: [PATCH 1/2] [clang] Fix crash on invalid `std::initializer_list` template-i

[clang] a0e1e68 - [clang][bytecode] Return Invalid() on non-constexpr builtins (#133700)

2025-04-02 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-31T18:53:12+02:00 New Revision: a0e1e680d28c4ef5f87be948d1d223fbfda2950c URL: https://github.com/llvm/llvm-project/commit/a0e1e680d28c4ef5f87be948d1d223fbfda2950c DIFF: https://github.com/llvm/llvm-project/commit/a0e1e680d28c4ef5f87be948d1d223fbfda2950c.diff L

[clang] [clang] remove unused frontend flag -fretain_subst_template_type_parm_type_ast_nodes (PR #134177)

2025-04-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/134177 This is a follow-up to #132748, where we deferred the flag removal in order to ease transition for external users. The plan is to merge this in the nearish future, in two weeks or so is my best guess. >From

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/2751 Here is the relevant piece

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-04-02 Thread Aniket Lal via cfe-commits
lalaniket8 wrote: pinging for review @arsenm @yxsamliu @rjmccall https://github.com/llvm/llvm-project/pull/115821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/131237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #130990)

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

[clang] f302f35 - [clang] Track final substitution for Subst* AST nodes (#132748)

2025-04-02 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-02T19:27:29-03:00 New Revision: f302f35526553abcb46dab278c4494c3d01deb45 URL: https://github.com/llvm/llvm-project/commit/f302f35526553abcb46dab278c4494c3d01deb45 DIFF: https://github.com/llvm/llvm-project/commit/f302f35526553abcb46dab278c4494c3d01deb45.dif

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/132748 ___ 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-02 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/134174 Update Sema Checking to always do an HLSL Array RValue cast in the case we are dealing with hlsl constant array types Instead of comparing canonical types, compare canonical unqualified types Add a test to show it

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

2025-04-02 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/SemaExprCXX.cpp clang/lib/Sema/SemaOve

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-02 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/134188 >From ac9833cd5abdaf4a91c785d5fa9d51190219851a Mon Sep 17 00:00:00 2001 From: David Rivera Date: Wed, 2 Apr 2025 21:02:00 -0400 Subject: [PATCH] [clang-tidy] Improve integer comparison by matching valid expre

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

2025-04-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: /cherry-pick dcc2182bce https://github.com/llvm/llvm-project/pull/133863 ___ 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-02 Thread Farzon Lotfi via cfe-commits
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return isinf((float4)V); } _DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp) _DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp) +//===--===// +// lit builtins overloa

[clang] dcc2182 - [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (#133863)

2025-04-02 Thread via cfe-commits
Author: Younan Zhang Date: 2025-04-03T11:15:42+08:00 New Revision: dcc2182bce3d2ef0e0a991664c51b4b3bfcf7197 URL: https://github.com/llvm/llvm-project/commit/dcc2182bce3d2ef0e0a991664c51b4b3bfcf7197 DIFF: https://github.com/llvm/llvm-project/commit/dcc2182bce3d2ef0e0a991664c51b4b3bfcf7197.diff

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

2025-04-02 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 %s -verify=expected,type-param -std=c++23 -DTYPE_PARAM +// RUN: %clang_cc1 %s -verify=expected,others -std=c++23 -DCONSTANT_PARAM +// RUN: %clang_cc1 %s -verify=expected,others -std=c++23 -DTYPE_TEMPLATE_PARAM +// RUN: %clang_cc1 %s -verify=exp

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

2025-04-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: /cherry-pick dcc2182bc https://github.com/llvm/llvm-project/pull/133863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-02 Thread Younan Zhang 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] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-04-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Reid Kleckner (rnk) Changes This reapplies 5ffd9bdb50b57 (#133545) with fixes. The BUILD_SHARED_LIBS=ON build was fixed by adding missing LLVM dependencies to the InterpTests binary in unittests/AST/ByteCo

[clang] [clang-format] Fix a bug in annotating braces (PR #134039)

2025-04-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/7879 Here is the releva

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

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

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-04-02 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/134195 This reapplies 5ffd9bdb50b57 (#133545) with fixes. The BUILD_SHARED_LIBS=ON build was fixed by adding missing LLVM dependencies to the InterpTests binary in unittests/AST/ByteCode/CMakeLists.txt . >From fe6604dc283

[clang] [llvm] [EquivalenceClasses] Use SmallVector for deterministic iteration order. (PR #134075)

2025-04-02 Thread Matt Arsenault via cfe-commits
@@ -138,6 +139,9 @@ class EquivalenceClasses { /// ECValues, it just keeps the key as part of the value. std::set TheMapping; + /// List of all members, used to provide a determinstic iteration order. + SmallVector Members; arsenm wrote: Can you combine

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Joseph Huber via cfe-commits
@@ -585,6 +597,23 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_processor_is: { +assert(CGM.getTriple().isSPIRV() &&

[clang] [HIP] Claim `--offload-compress` for `-M` (PR #133456)

2025-04-02 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/133456 >From be4ea80f2431bff0c017df3aef9f260dddfa9ccc Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 28 Mar 2025 11:30:39 -0400 Subject: [PATCH] [HIP] Claim --offloading-compress for -M Cmake automatical

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/133967 >From 0ab40315cd5ca320d84f87c99b8f23d9b6e8ed36 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 31 Mar 2025 14:31:24 -0700 Subject: [PATCH 1/5] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V b

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
erichkeane wrote: > This change adds two semi-magical builtins for AMDGPU: > > * `__builtin_amdgcn_processor_is`, which is similar in observable > behaviour with `__builtin_cpu_is`, except that it is never "evaluated" at run > time; > > * `__builtin_amdgcn_is_invocable`, which is beha

[clang] 2b7daaf - [sanitizer][CFI] Add support to build CFI with sanitize-coverage (#131296)

2025-04-02 Thread via cfe-commits
Author: Maxim Zhukov Date: 2025-04-02T16:05:44+03:00 New Revision: 2b7daaf9678181959982b219db0af106f4ef8e3e URL: https://github.com/llvm/llvm-project/commit/2b7daaf9678181959982b219db0af106f4ef8e3e DIFF: https://github.com/llvm/llvm-project/commit/2b7daaf9678181959982b219db0af106f4ef8e3e.diff

[clang] [sanitizer][CFI] Add support to build CFI with sanitize-coverage (PR #131296)

2025-04-02 Thread via cfe-commits
github-actions[bot] wrote: @Mephistophiles 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

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,64 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals all --version 5 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -target-cpu gfx900 -emit-llvm %s -o - | FileCheck --check-prefix=AMDGCN-GFX900 %s +// RUN: %cla

[clang] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-04-02 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/127634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-04-02 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 updated https://github.com/llvm/llvm-project/pull/130623 >From 8b2ad7c1475ff4aee065e9feb21469d184320472 Mon Sep 17 00:00:00 2001 From: Jack Styles Date: Fri, 7 Mar 2025 15:51:34 + Subject: [PATCH 1/8] [NFC][ARM] Split SIMD identifier away from MVE Previously, t

[clang] [llvm] [EquivalenceClasses] Use SmallVector for deterministic iteration order. (PR #134075)

2025-04-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. This looks reasonable to me. We could keep the existing API with a custom iterator, but given the limited amount of uses this seems ok. https://github.com/llvm/llvm-project/pull/134075 ___ cfe-commi

[libclc] [libclc] Move cbrt to the CLC library; vectorize (PR #133940)

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

[clang] [llvm] [EquivalenceClasses] Use SmallVector for deterministic iteration order. (PR #134075)

2025-04-02 Thread Florian Hahn via cfe-commits
@@ -138,6 +139,9 @@ class EquivalenceClasses { /// ECValues, it just keeps the key as part of the value. std::set TheMapping; + /// List of all members, used to provide a determinstic iteration order. + SmallVector Members; fhahn wrote: This is where th

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
mjklemm wrote: > Should the `nowait(EXPR)` behavior be guarded by the OpenMP version flag? It > seems to me that the tests would currently not respect which OpenMP version > is selected and always generate the error. I agree. This should be under `-fopenmp-version=6.0` https://github.com/llv

[clang] [llvm] [EquivalenceClasses] Use SmallVector for deterministic iteration order. (PR #134075)

2025-04-02 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/134075 >From 10afe2fb4743c0fccaad2797fffca174736a0997 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sat, 29 Mar 2025 20:20:39 + Subject: [PATCH 1/2] [EquivalenceClasses] Use SmallVector for deterministic iterati

[libclc] [libclc]: clspv: add a dummy implememtation for mul_hi (PR #134094)

2025-04-02 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: For the record, clspv implementation is based on OpMulExtended which is SPIR-V specific and not accessible from C. https://github.com/llvm/llvm-project/pull/134094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

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

2025-04-02 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132829 >From 66833f41d26a6c6355ef67b2f9041ba771b690b7 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 20:51:23 + Subject: [PATCH 1/3] [clang] Allow parentheses around CTAD declarators --- clang/do

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] [flang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-04-02 Thread Daniel Chen via cfe-commits
DanielCChen wrote: > LGTM. > > It would be safer/clearer to make the `IsFortran` argument change a separate > PR... Good point. I could have made another PR to set `flang-rt` library name only. Will keep that in mind. https://github.com/llvm/llvm-project/pull/131041 _

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-04-02 Thread Cassandra Beckley via cfe-commits
https://github.com/cassiebeckley updated https://github.com/llvm/llvm-project/pull/134034 >From 78ac1bc4225b41bc4b9fbd9fd9ab9dc82a2953ca Mon Sep 17 00:00:00 2001 From: Cassandra Beckley Date: Tue, 1 Apr 2025 23:12:02 -0700 Subject: [PATCH 1/3] [HLSL] Implement `SpirvType` and `SpirvOpaqueType`

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -7,13 +7,14 @@ void foo() { int main(int argc, char **argv) { int i; - #pragma omp target simd nowait( // expected-warning {{extra tokens at the end of '#pragma omp target simd' are ignored}} + #pragma omp target simd nowait( // expected-error {{expected expression}}

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -13329,6 +13359,9 @@ inline QualType Sema::CheckLogicalOperands(ExprResult &LHS, ExprResult &RHS, // The following is safe because we only use this method for // non-overloadable operands. + if (IsAMDGPUPredicateBI(LHS.get()) && IsAMDGPUPredicateBI(RHS.get())) ---

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -7,13 +7,13 @@ void foo() { int main(int argc, char **argv) { int i; -#pragma omp target teams distribute parallel for nowait( // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} +#pragma omp target teams dis

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -6,13 +6,11 @@ void foo() { } int main(int argc, char **argv) { -#pragma omp target teams nowait( // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}} - foo(); -#pragma omp target teams nowait (argc)) // expected-warning {{extra tokens

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -6,13 +6,13 @@ void foo() { } int main(int argc, char **argv) { - #pragma omp target parallel nowait( // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}} - foo(); + #pragma omp target parallel nowait( // expected-error {{expecte

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -7,13 +7,13 @@ void foo() { int main(int argc, char **argv) { int i; - #pragma omp target parallel for nowait( // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} + #pragma omp target parallel for nowait( // expected-error

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -6541,6 +6541,22 @@ ExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, if (Result.isInvalid()) return ExprError(); Fn = Result.get(); + // The __builtin_amdgcn_is_invocable builtin is special, and will be resolved erichke

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/133967 >From 0ab40315cd5ca320d84f87c99b8f23d9b6e8ed36 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 31 Mar 2025 14:31:24 -0700 Subject: [PATCH 1/6] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V b

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -15576,6 +15609,38 @@ static bool isOverflowingIntegerType(ASTContext &Ctx, QualType T) { return Ctx.getIntWidth(T) >= Ctx.getIntWidth(Ctx.IntTy); } +static Expr *ExpandAMDGPUPredicateBI(ASTContext &Ctx, CallExpr *CE) { + if (!CE->getBuiltinCallee()) +return CXXBool

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -15576,6 +15609,38 @@ static bool isOverflowingIntegerType(ASTContext &Ctx, QualType T) { return Ctx.getIntWidth(T) >= Ctx.getIntWidth(Ctx.IntTy); } +static Expr *ExpandAMDGPUPredicateBI(ASTContext &Ctx, CallExpr *CE) { + if (!CE->getBuiltinCallee()) +return CXXBool

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane requested changes to this pull request. The user interface design of these builtins is just completely unacceptable, and it has made the sema implementation more difficult than it needs to be. Best I can tell, the answer for even things like `decltype` changes wh

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -585,6 +597,23 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_processor_is: { +assert(CGM.getTriple().isSPIRV() &&

[clang] Remove duplicate API (PR #132776)

2025-04-02 Thread via cfe-commits
Jugst3r wrote: Sure, I did what @Endilll suggested. It is kind of unfortunate to have such similar type names :/. I don't think I can use the [[attribute]] C++-style syntax, maybe there is another syntax I am not aware of, but for the mean time I put the deprecated inside the comments. https:

[clang] [clang-tools-extra] [clang] support pack expansions for trailing requires clauses (PR #133190)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -78,6 +78,22 @@ class UnresolvedSetImpl; class VarTemplateDecl; enum class ImplicitParamKind; +// Holds a constraint expression along with a pack expansion index, if +// expanded. +struct AssociatedConstraint { + const Expr *ConstraintExpr = nullptr; + int ArgumentPackSub

[clang] [flang] [flang] Complete alignment of -x language modes with gfortran (PR #133775)

2025-04-02 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/133775 >From aeca7c2c7bf4cc7aef87374f3890f2a42e61d07d Mon Sep 17 00:00:00 2001 From: David Truby Date: Mon, 31 Mar 2025 19:39:37 +0100 Subject: [PATCH 1/2] [flang] Complete alignment of -x language modes with gfort

  1   2   3   4   >