[clang] [llvm] [HIP][HIPSTDPAR][NFC] Re-order & adapt `hipstdpar` specific passes (PR #134753)

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

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

2025-04-09 Thread Ashley Coleman via cfe-commits
@@ -0,0 +1,75 @@ +// 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) +{ V-FEXrt wrote: Is there a reason the function call

[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

[libclc] [libclc] Move shuffle/shuffle2 to the CLC library (PR #135000)

2025-04-09 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/135000 This commit moves the shuffle and shuffle2 builtins to the CLC library. In so doing it makes the headers simpler and re-usable for other builtin layers to hook into the CLC functions, if they wish. An addi

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

2025-04-09 Thread via cfe-commits
https://github.com/joaosaffran approved this pull request. LGTM, not an expert, though. 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] [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 edited https://github.com/llvm/llvm-project/pull/134362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-09 Thread Andy Kaylor 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 ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-09 Thread Andy Kaylor via cfe-commits
@@ -232,6 +233,161 @@ 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] [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 edited https://github.com/llvm/llvm-project/pull/134362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

2025-04-09 Thread Ryosuke Niwa via cfe-commits
@@ -448,6 +483,10 @@ class UnretainedLambdaCapturesChecker : public RawPtrRefLambdaCapturesChecker { return RTC->isUnretained(QT); } + virtual bool isPtrType(const std::string &Name) const final { rniwa wrote: Yes, line 290 / 300 and line 318 / 334.

[clang] [OpenACC][CIR] Implement 'data' construct lowering (PR #135038)

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

[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] [OpenACC][CIR] Implement 'data' construct lowering, lower OACC->LLVMIR (PR #135038)

2025-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/135038 This patch does two things primarily: 1- It does the lowering of the OpenACC 'data' construct, which requires getting the `default` clause (as `data` requires at least 1 of a list of clauses, and this is th

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

2025-04-09 Thread Erich Keane via cfe-commits
erichkeane wrote: > This came up on the core reflector again just yesterday; would be worth > asking there. That was us :D https://github.com/llvm/llvm-project/pull/134998 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

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

2025-04-09 Thread Erich Keane via cfe-commits
erichkeane wrote: > > > I thought CWG's preferred direction on this was to reject entirely? > > > > > > What do they wish to reject? Defining an enum in a different declaration > > context than its primary context? That seems odd. > > Do you have an idea of the CWG DR? We looked but couldn't f

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

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

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

2025-04-09 Thread Andy Kaylor 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] [clang] Implement CWG2803 and CWG2958 (PR #132779)

2025-04-09 Thread via cfe-commits
@@ -6,6 +6,89 @@ // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected,since-cxx11,cxx11-23,since-cxx20,since-cxx23 %s // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected,since-cxx11,since-cxx20,since-cxx23,since-cxx26 %s +namespace cwg2803 { // cwg2803

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

2025-04-09 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,24 @@ +// REQUIRES: amdgpu-registered-target Artem-B wrote: I've just checked using experimental target `csky-unknown-elf ` that's not enabled by default, and clang indeed errors out if we attempt to generate code, but works OK with `-fsyntax-only`.

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

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes The single file parse mode is supposed to enter both branches of an `#if` directive whenever the condition contains undefined identifiers. This patch adds support for undefined function-like macros, wher

[clang] [clang] Implement CWG2611 (PR #133747)

2025-04-09 Thread via cfe-commits
@@ -16441,14 +16441,23 @@ TreeTransform::TransformCXXFoldExpr(CXXFoldExpr *E) { return true; } - if (ParenExpr *PE = dyn_cast_or_null(Result.get())) -PE->setIsProducedByFoldExpansion(); - // If we had no init and an empty pack, and we're not retaining an expan

[clang] fa273e1 - [OpenACC][CIR] Implement 'data' construct lowering (#135038)

2025-04-09 Thread via cfe-commits
Author: Erich Keane Date: 2025-04-09T10:45:17-07:00 New Revision: fa273e1158edb109e1c392a0d8e18b711d0e008e URL: https://github.com/llvm/llvm-project/commit/fa273e1158edb109e1c392a0d8e18b711d0e008e DIFF: https://github.com/llvm/llvm-project/commit/fa273e1158edb109e1c392a0d8e18b711d0e008e.diff L

[clang] [clang] Implement CWG2611 (PR #133747)

2025-04-09 Thread via cfe-commits
@@ -35,6 +35,29 @@ namespace std { template T declval(); } // namespace std +namespace cwg2611 { // cwg2611: 21 +#if __cplusplus >= 201703L +template class R {}; +template auto a(Ts... xs) -> R; +template auto b(Ts... xs) -> R; +template auto c(Ts... xs, int i = 0) -> R; +te

[clang] [OpenACC][CIR] Implement 'data' construct lowering (PR #135038)

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

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-09 Thread John McCall via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

[clang] [clang-format][NFC] Add FormatToken::is(tok::ObjCKeywordKind) (PR #134973)

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

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

2025-04-09 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. 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] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-09 Thread Devon Loehr via cfe-commits
DKLoehr wrote: Can't comment on MSVC's behavior, but this does seem to eliminate the errors we were seeing in chromium (at least for my one local build). https://github.com/llvm/llvm-project/pull/135041 ___ cfe-commits mailing list cfe-commits@lists.l

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

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

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes Split from https://github.com/llvm/llvm-project/pull/133161 This patch adds start and end line numbers to clang-doc. Currently clang-doc only encodes the start line numbers of records, struct, etc. Th

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/135081 Split from https://github.com/llvm/llvm-project/pull/133161 This patch adds start and end line numbers to clang-doc. Currently clang-doc only encodes the start line numbers of records, struct, etc. This patc

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

2025-04-09 Thread Pranav Kant via cfe-commits
pranavk wrote: This causes another mangling issue similar to [this](https://github.com/llvm/llvm-project/pull/133610#issuecomment-2787332042). Here's the repro: ``` namespace { template struct enable_if { typedef int type; }; template using enable_if_t = enable_if<_Bp>::type; template str

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/135081 >From 8fb896f16396c2e01427ac7baa8791461ff500a3 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 3 Apr 2025 17:07:01 -0400 Subject: [PATCH 1/4] [clang-doc] add start and end line number --- clang-tools-e

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

2025-04-09 Thread Pranav Kant via cfe-commits
pranavk wrote: With this commit, I get: ``` llvm-readelf -s -W reduced.o | grep -P 'optional.*aS.*srNS[0-9]_I' 6: 0 NOTYPE GLOBAL DEFAULT UND _ZN12_GLOBAL__N_18optionalaSIiTnNS_9enable_ifIXsr4_AndINS_17integral_constantIXu9__is_sameT_S0_NS_7_OrImplIXsrNS3_IXu9__i

[clang-tools-extra] [clang-doc][NFC] refactor out file helpers (PR #134298)

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

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/135081 >From 8fb896f16396c2e01427ac7baa8791461ff500a3 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 3 Apr 2025 17:07:01 -0400 Subject: [PATCH 1/5] [clang-doc] add start and end line number --- clang-tools-e

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-09 Thread Tom Honermann via cfe-commits
tahonermann wrote: @erichkeane, in case you missed the previous notice, this is ready for your continued review. https://github.com/llvm/llvm-project/pull/133030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

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

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

2025-04-09 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-09T14:27:09-07:00 New Revision: f75dce43ea0a98c0ade916cf3ffcc7548f569821 URL: https://github.com/llvm/llvm-project/commit/f75dce43ea0a98c0ade916cf3ffcc7548f569821 DIFF: https://github.com/llvm/llvm-project/commit/f75dce43ea0a98c0ade916cf3ffcc7548f569821.diff L

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

2025-04-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed 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] [Clang][AMDGPU] Accept builtins in lambda declarations (PR #135027)

2025-04-09 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -0,0 +1,24 @@ +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -std=c++20 -triple amdgcn -target-cpu tahiti -fsyntax-only -fcuda-is-device -verify=expected -o - %s +// RUN: %clang_cc1 -std=c++20 -triple amdgcn -target-cpu gfx950 -fsyntax-only -fcuda-is-device -o - %

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-09 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane, in case you missed the previous notice, this is ready for your > continued review. Thanks, I did miss that. I'll try to get to this later this week. https://github.com/llvm/llvm-project/pull/133030 ___ cfe-commits ma

[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/3] [SPIR-V] Add hlsl_private address space for

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

2025-04-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It's not clear to me why the example in the PR description should be rejected, given https://eel.is/c++draft/dcl.enum#12.sentence-1. I also don't see a clear consensus on CWG reflector to determine whether this change moves us in the right direction. Do we have to change status

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

2025-04-09 Thread Mészáros Gergely via cfe-commits
@@ -10591,6 +10591,45 @@ static void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS, << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); } +static void DetectPrecisionLossInComplexDivision(Sema &S, QualType DivisorTy, +

[clang] [llvm] [NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)

2025-04-09 Thread Srinivasa Ravi via cfe-commits
@@ -1548,6 +1548,45 @@ let TargetPrefix = "nvvm" in { Intrinsic<[llvm_v2f16_ty], [llvm_i16_ty], [IntrNoMem, IntrNoCallback]>; def int_nvvm_e5m2x2_to_f16x2_rn_relu : ClangBuiltin<"__nvvm_e5m2x2_to_f16x2_rn_relu">, Intrinsic<[llvm_v2f16_ty], [llvm_i16_ty], [IntrNoM

[clang] [llvm] [NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)

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

[clang] [llvm] [NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)

2025-04-09 Thread Srinivasa Ravi via cfe-commits
@@ -1548,6 +1548,45 @@ let TargetPrefix = "nvvm" in { Intrinsic<[llvm_v2f16_ty], [llvm_i16_ty], [IntrNoMem, IntrNoCallback]>; def int_nvvm_e5m2x2_to_f16x2_rn_relu : ClangBuiltin<"__nvvm_e5m2x2_to_f16x2_rn_relu">, Intrinsic<[llvm_v2f16_ty], [llvm_i16_ty], [IntrNoM

[clang] [llvm] [NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)

2025-04-09 Thread Srinivasa Ravi via cfe-commits
@@ -1944,6 +1944,62 @@ def : Pat<(int_nvvm_e5m2x2_to_f16x2_rn Int16Regs:$a), def : Pat<(int_nvvm_e5m2x2_to_f16x2_rn_relu Int16Regs:$a), (CVT_f16x2_e5m2x2 $a, CvtRN_RELU)>; +def : Pat<(int_nvvm_ff_to_e2m3x2_rn f32:$a, f32:$b), + (CVT_e2m3x2_f32 $a, $b, CvtRN)

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

2025-04-09 Thread via cfe-commits
https://github.com/metkarpoonam 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] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-09 Thread Cyndy Ishida via cfe-commits
@@ -5834,13 +5847,27 @@ bool ASTReader::readASTFileControlBlock( break; case INPUT_FILE: bool Overridden = static_cast(Record[3]); - const size_t FilenameAsRequestedLength = Record[7] + 1; - auto ResolvedFilenameAsRequested = Resolv

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-09 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/133107 >From c46eda67cd7434dcce5c1f29125a940dc4ff64ba Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Wed, 26 Mar 2025 18:29:38 +0300 Subject: [PATCH 1/6] [CLANG] Enable alignas after GNU attributes --- clang/l

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

2025-04-09 Thread Dmitry Sidorov via cfe-commits
MrSidims wrote: @lalaniket8 @arsenm I don't have a strong opinion, but shouldn't this transformation be done during lowering to the target? Current version of the patch brings odd behavior for LLVM IR to SPIR-V lowering for OpenCL kernels. SPIR-V don't allow one EntryPoint to refer another Ent

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

2025-04-09 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis edited https://github.com/llvm/llvm-project/pull/131477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-04-09 Thread Baranov Victor via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-09 Thread Jannick Kremer via cfe-commits
@@ -16,3 +17,76 @@ def test_file(self): self.assertEqual(str(file), "t.c") self.assertEqual(file.name, "t.c") self.assertEqual(repr(file), "") + +def test_file_eq(self): +path = os.path.join(inputs_dir, "hello.cpp") +header_path = os.

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

2025-04-09 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: FYI: I found more issues when testing with `std::complex`: https://github.com/llvm/llvm-project/issues/134980 https://github.com/llvm/llvm-project/pull/131477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang][bytecode] Clear inactive union fields when copying (PR #134982)

2025-04-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/134982 When copying unions, we need to only copy the active field of the source union, which we were already doing. However, we also need to zero out the (now) inactive fields, so we don't end up with dangling pointe

[clang] [clang][bytecode] Clear inactive union fields when copying (PR #134982)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes When copying unions, we need to only copy the active field of the source union, which we were already doing. However, we also need to zero out the (now) inactive fields, so we don't end up with dangling poin

[clang] [clang][bytecode][NFC] Avoid implicit integer conversion (PR #134983)

2025-04-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/134983 See discussion in https://github.com/llvm/llvm-project/pull/134672 >From 365ca307b79b524e26ff91165617d23d46f075d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 9 Apr 2025 11:43:25 +02

[clang] [clang][bytecode][NFC] Avoid implicit integer conversion (PR #134983)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes See discussion in https://github.com/llvm/llvm-project/pull/134672 --- Full diff: https://github.com/llvm/llvm-project/pull/134983.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+

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

2025-04-09 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis updated https://github.com/llvm/llvm-project/pull/131477 From 92101ddf4a5f40b12434fb0e2b6e67c176750f9d Mon Sep 17 00:00:00 2001 From: Gergely Meszaros Date: Sat, 15 Mar 2025 22:37:07 +0100 Subject: [PATCH 1/4] [Clang][Sema] Fix -Whigher-precision-for-complex-division

[libclc] [NFC][libclc] Merge atomic extension built-ins with identical name into a single file (PR #134489)

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

[libclc] [NFC][libclc] Merge atomic extension built-ins with identical name into a single file (PR #134489)

2025-04-09 Thread Fraser Cormack via cfe-commits
@@ -6,6 +6,17 @@ // //===--===// +// cl_khr_global_int32_base_atomics frasercrmck wrote: Sorry to go back to this but I think really these should all be `#if` guarded with the appropriate e

[libclc] [NFC][libclc] Merge atomic extension built-ins with identical name into a single file (PR #134489)

2025-04-09 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck commented: LGTM other than the last nit. I can confirm there are no codegen changes to any target that I can observe. Thanks again. https://github.com/llvm/llvm-project/pull/134489 ___ cfe-commits mailing list cfe-commit

[libclc] [NFC][libclc] Merge atomic extension built-ins with identical name into a single file (PR #134489)

2025-04-09 Thread Fraser Cormack via cfe-commits
@@ -6,7 +6,28 @@ // //===--===// -#include +#include +#include + +// cl_khr_global_int32_base_atomics +#define IMPL(TYPE) \ frasercrmck wrote: Oh nice one, yeah. That explains why it isn'

[clang] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-04-09 Thread Sameer Sahasrabuddhe via cfe-commits
ssahasra wrote: >From the spec for convergence control tokens: https://llvm.org/docs/ConvergentOperations.html#inferring-non-convergence > An optimizer may remove the convergent attribute on a function if it can > prove that the function does not contain a call to > `llvm.experimental.converge

[clang] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-04-09 Thread Sameer Sahasrabuddhe via cfe-commits
ssahasra wrote: > When a callee is marked as convergent, some targets like HLSL/SPIR-V add a > convergent token to the call. This is valid if both functions are marked as convergent. I didn't understand the validity part. Why is the caller required to be convergent in order to add a token to a

[libclc] 949bf51 - [libclc][NFC] Fix up inconsistent copyright headers

2025-04-09 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-04-09T12:00:08+01:00 New Revision: 949bf518fcc04285f40aa96a1c123bf0141fafd4 URL: https://github.com/llvm/llvm-project/commit/949bf518fcc04285f40aa96a1c123bf0141fafd4 DIFF: https://github.com/llvm/llvm-project/commit/949bf518fcc04285f40aa96a1c123bf0141fafd4.diff

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

2025-04-09 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: @efriedma-quic Any more comments? 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] [HLSL] Implement the dst HLSL Function (PR #133828)

2025-04-09 Thread via cfe-commits
https://github.com/metkarpoonam 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] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-04-09 Thread Nathan Gauër via cfe-commits
Keenuts wrote: FYI: there is this PR which I think will replace this one: https://github.com/llvm/llvm-project/pull/134863 > I didn't understand the validity part. Why is the caller required to be > convergent in order to add a token to a callsite? Given this example: ```llvm declare i32 @fo

[clang] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-04-09 Thread Nathan Gauër via cfe-commits
Keenuts wrote: miss-typed enter, sent the comment above too early. There are multiple ways to solve this issue: - fix the FunctionAttr to run DCE again once the `convergent` attribute is removed to make sure those invalid cases don't happen. - fix the FunctionAttr to not remove `convergent` i

[clang-tools-extra] [clang-tidy] `matchesAnyListedTypeName` support non canonical types (PR #134869)

2025-04-09 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. https://github.com/llvm/llvm-project/pull/134869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 78c86b3 - [clang][bytecode][NFC] Avoid implicit integer conversion (#134983)

2025-04-09 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-09T13:44:24+02:00 New Revision: 78c86b38b04bdabc76f631263ab0f4faf8698af6 URL: https://github.com/llvm/llvm-project/commit/78c86b38b04bdabc76f631263ab0f4faf8698af6 DIFF: https://github.com/llvm/llvm-project/commit/78c86b38b04bdabc76f631263ab0f4faf8698af6.diff L

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

2025-04-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. My primary concern remains the false positives with the analysis; that means we will be rejecting (a lot of) valid code. I just went through the bug database and resolved ~10 issues as duplicates of https://github.com/llvm

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

2025-04-09 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/131207 >From bff3db4f6a7fdff572b662048f395c280a11d94b Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 13 Mar 2025 21:18:14 +0100 Subject: [PATCH 1/5] [Clang] [Sema] Make -Wreturn-type an error by default --- clan

[clang] [clang][bytecode][NFC] Avoid implicit integer conversion (PR #134983)

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/15695 Here is the relevant piece of the

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

2025-04-09 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng updated https://github.com/llvm/llvm-project/pull/134171 >From 719bb94279f64f134c826faa22898e4e549bb23c Mon Sep 17 00:00:00 2001 From: kmpeng Date: Thu, 27 Mar 2025 14:39:27 -0700 Subject: [PATCH 01/11] finished lit implementation, added codegen and sema tests --- .

<    1   2   3   4   5