[clang] [llvm] [PowerPC] Enable indiviual crbits tracking at -O2 (PR #133617)

2025-04-04 Thread Henry Jiang via cfe-commits
https://github.com/mustartt updated https://github.com/llvm/llvm-project/pull/133617 >From 8a71c3bb096045a10c8800d9abbc9bb9cb603ebe Mon Sep 17 00:00:00 2001 From: Henry Jiang Date: Sun, 30 Mar 2025 00:23:10 -0400 Subject: [PATCH] Enable indiviual crbits tracking at O2 --- clang/lib/Basic/Targ

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-04-04 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @nico thanks, that's landed. Let me know if it's all green now, otherwise we proceed with the revert. https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [clang][ExprConst] Check record base classes for valid structs (PR #132270)

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

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

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

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `misc-`, `cppcore-` and other checks (PR #133694)

2025-04-04 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/133694 >From 3f2086a843ccbc2dca5185199bbb91c366bcae06 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 31 Mar 2025 13:12:23 +0300 Subject: [PATCH 1/4] [clang-tidy] improve docs for various checks --- .../che

[clang] [llvm] [X86][AVX10.2] Remove YMM rounding from VMINMAXP[H,S,D] (PR #132405)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Phoebe Wang (phoebewang) Changes Ref: https://cdrdv2.intel.com/v1/dl/getContent/784343 --- Patch is 55.76 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/132405.diff 15 Files Affected:

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -710,6 +710,89 @@ class ScalarExprEmitter : public StmtVisitor { HANDLEBINOP(Xor) HANDLEBINOP(Or) #undef HANDLEBINOP + + mlir::Value emitCmp(const BinaryOperator *e) { +mlir::Value result; +QualType lhsTy = e->getLHS()->getType(); +QualType rhsTy = e->getRH

[libclc] [libclc] Add license headers to files missing them (PR #132239)

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

[clang-tools-extra] [clang-tidy] Added Conflicting Global Accesses checker (PR #130421)

2025-04-04 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: If this is a CERT check, please add the corresponding aliases towards the CERT module. https://github.com/llvm/llvm-project/pull/130421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-04-04 Thread via cfe-commits
Sirraide wrote: (grep for `DiagCompat()` if you’re unsure as to what to do) https://github.com/llvm/llvm-project/pull/133806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

2025-04-04 Thread Balazs Benics via cfe-commits
@@ -1139,6 +1289,271 @@ void deque_insert_end(std::deque &D, int n) { // clang_analyzer_express(clang_analyzer_iterator_position(i3)); FIXME: expect warning $D.end() - 1 } +/// insert_range() +/// +/// - Design decision: shifts positions to the <-LEFT<- (i.e. all iterator +

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,212 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -std=c99 -Wno-dangling -emit-llvm -o - %s | FileCheck %s --check-prefix=C99 +// RUN: %clang_cc1 -std=c11 -Wno-dangling -emit-llvm -o - %s |

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

2025-04-04 Thread Jan Voung via cfe-commits
jvoung wrote: > @ymand @jvoung I'd like to know if you tried this patch within google and > within your tooling, and if you can report whether it is suited and if there > is any noteworthy performance impact. Ok, I tried some experiments. Our nullability analysis tests do now pass without the

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-04-04 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/131900 >From 7ef40ee7d88872dbee1345cbd822e4aed8a22626 Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Tue, 18 Mar 2025 11:30:15 -0700 Subject: [PATCH 01/14] Add codegen tests, Sema tests, SPIR-V backend t

[clang] [NFC][HLSL][RootSignature] Make the Lexer adhere to naming conventions (PR #134136)

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

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-04-04 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff closed https://github.com/llvm/llvm-project/pull/131649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

2025-04-04 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. https://github.com/llvm/llvm-project/pull/131997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Arm] Add more -mtp=cp15 tests (PR #134098)

2025-04-04 Thread Simon Tatham via cfe-commits
@@ -1,93 +1,94 @@ -// Test of the AArch32 values of -mtp=, checking that each one maps to -// the right target features. - -// RUN: %clang --target=armv7-linux -mtp=cp15 -### -S %s 2>&1 | \ -// RUN: FileCheck -check-prefix=ARMv7_THREAD_POINTER-HARD %s -// ARMv7_THREAD_POINTER-HARD

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-04-04 Thread Erich Keane via cfe-commits
@@ -2474,9 +2476,9 @@ inline bool DoShift(InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS) { if (!S.noteUndefinedBehavior()) return false; RHS = -RHS; -return DoShifthttps://github.com/llvm/llvm-project/pull/130868 _

[clang] [NFC] [ASTMatchers] Share code of `forEachArgumentWithParamType` with UnsafeBufferUsage (PR #132387)

2025-04-04 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov updated https://github.com/llvm/llvm-project/pull/132387 >From ef63166c24f7328af8177220be706a573d97009e Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Fri, 21 Mar 2025 11:42:32 +0100 Subject: [PATCH 1/3] [NFC] [ASTMatchers] Share code of `forEachArgumentWit

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -462,6 +462,58 @@ def ReturnOp : CIR_Op<"return", [ParentOneOf<["FuncOp", "ScopeOp", "DoWhileOp", let hasVerifier = 1; } +//===--===// +// IfOp +//===-

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

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

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-04 Thread Kito Cheng via cfe-commits
@@ -486,6 +486,24 @@ def : SysReg<"mctrctl", 0x34e>; // Vendor CSRs //===--- +// XSfmclic +let FeaturesRequired = [{ {RISCV::FeatureVendorXSfmclic} }] in { +def : SysReg<"mtvt", 0x307>; +def : SysReg<"mnxti", 0x345>; +def : SysReg<"m

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

2025-04-04 Thread Sumit Agarwal via cfe-commits
https://github.com/sumitsays 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] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
ilovepi wrote: hmm, I tried adding some of the individual passes, and ran into some other errors. Let me give that another try w/ that PR as an example. https://github.com/llvm/llvm-project/pull/134434 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [CIR] Remove failing binop test (PR #133001)

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

[clang] Optimize Module Dependency Handling for Efficient Memory Usage (PR #132287)

2025-04-04 Thread Ayush Pareek via cfe-commits
ayushpareek2003 wrote: @Bigcheese Please have a look https://github.com/llvm/llvm-project/pull/132287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Do not use the GEP result to infer offset and result type (PR #134221)

2025-04-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM. Please edit the commit message to avoid auto-close of https://github.com/llvm/llvm-project/issues/132449. https://github.com/llvm/llvm-project/pull/134221 ___ cfe-commits mailing list cfe-comm

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

2025-04-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/133850 >From beba62a4b257836076147e5146b9bb693e467f83 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] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-04-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/133776 ___ 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-04 Thread Aaron Ballman 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] [llvm] Hlsl asuint16 function (PR #132315)

2025-04-04 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/132315 >From 6ce249d7e4bea669480c06a935f88a21894aba67 Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Wed, 19 Mar 2025 09:16:30 -0700 Subject: [PATCH 1/9] Add asuint16 intrinsic and codegen test --- cla

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

2025-04-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,152 @@ +// RUN: %clang_cc1 -finclude-default-header -fnative-half-type -triple \ +// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -o - | \ +// RUN: FileCheck %s --check-prefixes=CHECK,CHECK-DXIL +// RUN: %clang_cc1 -finclude-default-header -fnative-half-type -t

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

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Sumit Agarwal (sumitsays) Changes Resolves #99221 Key points: For SPIRV backend, it decompose into a `dot` followed a `add`. - [x] Implement dot2add clang builtin, - [x] Link dot2add clang builtin with hlsl_intrinsics.h - [x] Add sema c

[clang] [llvm] [LLVM][Clang][Cygwin] Fix Cygwin builds (PR #134458)

2025-04-04 Thread Mateusz Mikuła via cfe-commits
https://github.com/mati865 updated https://github.com/llvm/llvm-project/pull/134458 From adbcc7f650edfb4f2f86d1146b8116794a9de6df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Sat, 8 Feb 2025 01:13:06 +0100 Subject: [PATCH 1/4] [Clang][Cygwin] Enable few conditions that

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/134434 >From 80c36153e55398bee01e0167e722c930732b48e7 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 4 Apr 2025 11:49:02 -0700 Subject: [PATCH 1/2] [fatlto] Add coroutine passes when using FatLTO with ThinLTO W

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-04 Thread Trevor Gross via cfe-commits
@@ -3,6 +3,18 @@ ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s +; Test f16. +declare half @llvm.fabs.f16(half %f) +define half @f0(half %f) { +; CHECK-LABEL: f0: +; CHECK: brasl %r14, __

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-04 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 edited https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This fixes partial ordering of pack expansions of NTTPs, by procedding with the check using the pattern of the NTTP through the rules of the non-pack case. This also unifies almost all of the different v

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

2025-04-04 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: there is no lowercase `__directx__`. and the lowercase spirv one

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

2025-04-04 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: This is worth a release note item. https://github.com/llvm/llvm-project/pull/134016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [sanitizer] predict trap checks succeed (PR #134310)

2025-04-04 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/134310 ___ 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-04 Thread Deric C. via cfe-commits
https://github.com/Icohedron 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] [clang] [sanitizer] predict trap checks succeed (PR #134310)

2025-04-04 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/134310 >From 44f9ccd6b4104fb07ad9cf9581c41c6d473525ec Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 3 Apr 2025 14:53:29 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

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

2025-04-04 Thread Deric C. via cfe-commits
https://github.com/Icohedron 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] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Erich Keane via cfe-commits
@@ -462,6 +462,58 @@ def ReturnOp : CIR_Op<"return", [ParentOneOf<["FuncOp", "ScopeOp", "DoWhileOp", let hasVerifier = 1; } +//===--===// +// IfOp +//===-

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > @Andres-Salamanca thanks for working on this. We usually write tests that > exercise any possible different paths codegen can take. For next rounds: it's > fine if you add less things in one go and make it more incremental with the > use of (a) errorNYI and (b) assert on mi

[clang] [HLSL][RootSignature] Define and integrate `HLSLRootSignatureAttr` (PR #134124)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-dbg-bootstrap-build` running on `libc-x86_64-debian` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/200/builds/6689 Here is the releva

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

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

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

2025-04-04 Thread Deric C. via cfe-commits
https://github.com/Icohedron approved this pull request. I like this change. It helps makes implementing builtins more consistent between SPIR-V and DirectX/DXIL https://github.com/llvm/llvm-project/pull/134439 ___ cfe-commits mailing list cfe-commits

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #124651)

2025-04-04 Thread via cfe-commits
https://github.com/Un1q32 updated https://github.com/llvm/llvm-project/pull/124651 >From d4e97c4113086c3d2dfa3bf6e9ecfee377f8c4b6 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 27 Jan 2025 18:00:34 -0500 Subject: [PATCH 1/3] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and olde

[clang] [llvm] [clang] [OpenMP] New OpenMP 6.0 self_maps clause - CodeGen (PR #134131)

2025-04-04 Thread via cfe-commits
@@ -236,6 +236,8 @@ enum class OpenMPOffloadMappingFlags : uint64_t { // dynamic. // This is an OpenMP extension for the sake of OpenACC support. OMP_MAP_OMPX_HOLD = 0x2000, + /// Self directs mapping without creating a separate device copy. + OMP_MAP_SELF = 0x4000, ---

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

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

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-04 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,27 @@ +! Test forwarding just the forwarding of -frepack-arrays-contiguity options: +! RUN: %flang -frepack-arrays-contiguity=whole %s -### -fsyntax-only 2>&1 | FileCheck --check-prefix=WHOLECMD %s +! RUN: %flang -frepack-arrays-contiguity=innermost %s -### -fsyntax-on

[clang] Reland "[HLSL][RootSignature] Define and integrate HLSLRootSignatureAttr" (PR #134293)

2025-04-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/134293 This pr relands https://github.com/llvm/llvm-project/pull/134124. It resolves the many linking errors during build, [here](https://github.com/llvm/llvm-project/pull/134124#issuecomment-2776370486). There was a

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-04-04 Thread David Rivera via cfe-commits
RiverDave wrote: Ping @HerrCai0907 https://github.com/llvm/llvm-project/pull/129370 ___ 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-04 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/134188 >From b37d2b18e12cce53137eb78af5507ebf13ee45a1 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-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-04 Thread David Rivera via cfe-commits
@@ -177,6 +177,10 @@ Changes in existing checks matched scenarios of ``find`` and ``rfind`` methods and fixing false positives when those methods were called with 3 arguments. +- Improved :doc:`modernize-use-integer-sign-comparison RiverDave wrote: Thanks

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-04 Thread via cfe-commits
https://github.com/irymarchyk updated https://github.com/llvm/llvm-project/pull/134337 >From df25a8bbfd827085265c51a44bedbf38deebbab4 Mon Sep 17 00:00:00 2001 From: Ivan Rymarchyk <> Date: Sat, 29 Mar 2025 13:54:32 -0700 Subject: [PATCH 1/2] [clang-format]: Add `Custom` to `ShortFunctionStyle`;

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

2025-04-04 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/134188 >From 3a2d0c5cc8de153e6d0139154c2c6cd674936a40 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-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-04 Thread David Rivera via cfe-commits
@@ -166,6 +166,10 @@ Changes in existing checks excluding variables with ``thread_local`` storage class specifier from being matched. +- Improved :doc:`modernize-use-integer-sign-comparison RiverDave wrote: Figured it out the instant I pushed my changes 😂

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

2025-04-04 Thread via cfe-commits
@@ -166,6 +166,10 @@ Changes in existing checks excluding variables with ``thread_local`` storage class specifier from being matched. +- Improved :doc:`modernize-use-integer-sign-comparison EugeneZelenko wrote: Should be after `modernize-use-default-membe

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-04 Thread via cfe-commits
@@ -871,13 +871,81 @@ struct FormatStyle { /// void f() { bar(); } /// \endcode SFS_All, +/// Configure merge behavior using AllowShortFunctionsOnASingleLineOptions +SFS_Custom, }; /// Dependent on the value, ``int f() { return 0; }`` can be put on

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

2025-04-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,23 @@ +//===- SemaDirectX.cpp - Semantic Analysis for DirectX constructs--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-04 Thread via cfe-commits
@@ -871,13 +871,81 @@ struct FormatStyle { /// void f() { bar(); } /// \endcode SFS_All, +/// Configure merge behavior using AllowShortFunctionsOnASingleLineOptions +SFS_Custom, }; /// Dependent on the value, ``int f() { return 0; }`` can be put on

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-04 Thread via cfe-commits
@@ -871,13 +871,81 @@ struct FormatStyle { /// void f() { bar(); } /// \endcode SFS_All, +/// Configure merge behavior using AllowShortFunctionsOnASingleLineOptions +SFS_Custom, }; /// Dependent on the value, ``int f() { return 0; }`` can be put on

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

2025-04-04 Thread Slava Zakharin via cfe-commits
vzakhari wrote: May I ask not to merge this yet? I have a question above, but I will not be at work until next Thursday to discuss this in a timely manner. https://github.com/llvm/llvm-project/pull/134362 ___ cfe-commits mailing list cfe-commits@list

[clang] [CIR] Upstream support for logical not operations (PR #133966)

2025-04-04 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/2588 Here is the relevant piece

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -442,6 +457,25 @@ class CIRGenFunction : public CIRGenTypeCache { mlir::LogicalResult emitDeclStmt(const clang::DeclStmt &s); LValue emitDeclRefLValue(const clang::DeclRefExpr *e); + /// Emit an if on a boolean condition to the specified blocks. + /// FIXME: Based on

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-04 Thread Trevor Gross via cfe-commits
@@ -0,0 +1,65 @@ +; Test copysign intrinsics involving half. +; +; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s + +declare half @llvm.copysign.f16(half, half) +declare float @llvm.copysign.f32(float, float) +declare double @llvm.copysign.f64(double, double) + +; Test f16

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

2025-04-04 Thread via cfe-commits
Sirraide wrote: Ah, I think I’ve found what the problem is: it would seem that moving the diagnostics around in the file caused whatever the ‘diagnostic category number’ is supposed to be of some of these diagnostics to change, and there were tests that check for that that still need to be upd

[clang] [MS][clang] Fix crash on deletion of array of pointers (PR #134088)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes Sometimes a non-array delete is treated as delete[] when input pointer is pointer to array. With vector deleting destructors support we now generate a virtual destructor call instead of simple loo

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-04 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +51,150 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Erich Keane via cfe-commits
@@ -135,6 +135,55 @@ mlir::Location CIRGenFunction::getLoc(mlir::Location lhs, mlir::Location rhs) { return mlir::FusedLoc::get(locs, metadata, &getMLIRContext()); } +bool CIRGenFunction::ContainsLabel(const Stmt *s, bool ignoreCaseStmts) { + // Null statement, not a label

[clang-tools-extra] [NFC] Remove dead code detected by code sanitizer. (PR #134385)

2025-04-04 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/134385 >From 02ae197808f19541127b3e80448aa8034a8e8b1d Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Fri, 4 Apr 2025 07:05:26 -0700 Subject: [PATCH 1/2] [NFC] Remove dead code detected by code santizer. ---

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

2025-04-04 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

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

2025-04-04 Thread via cfe-commits
https://github.com/MillePlateaux created https://github.com/llvm/llvm-project/pull/134465 Added judgment statements and accurately reported errors.Closes #133509 >From c7bd0c4413cbf4768105be178341ff169e460617 Mon Sep 17 00:00:00 2001 From: MillePlateaux Date: Fri, 4 Apr 2025 16:26:25 -0700 Sub

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

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (MillePlateaux) Changes Added judgment statements and accurately reported errors.Closes #133509 --- Full diff: https://github.com/llvm/llvm-project/pull/134465.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaStmt.cpp (+8)

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

2025-04-04 Thread Deric C. via cfe-commits
@@ -0,0 +1,23 @@ +//===- SemaDirectX.cpp - Semantic Analysis for DirectX constructs--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/134038 >From a670287721da08e54e2908e9abe52ad86a92769b Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 2 Apr 2025 14:44:40 +0800 Subject: [PATCH 1/4] [Clang] Fix dependent local class instantiation bugs --- cla

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -54,6 +56,67 @@ struct CIRFlattenCFGPass : public CIRFlattenCFGBase { void runOnOperation() override; }; +struct CIRIfFlattening : public mlir::OpRewritePattern { + using OpRewritePattern::OpRewritePattern; + + mlir::LogicalResult + matchAndRewrite(cir::IfOp ifOp, +

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -447,6 +448,133 @@ mlir::LogicalResult cir::ReturnOp::verify() { return success(); } +//===--===// +// IfOp +//===--===// + +ParseResult

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -447,6 +448,133 @@ mlir::LogicalResult cir::ReturnOp::verify() { return success(); } +//===--===// +// IfOp +//===--===// + +ParseResult

[clang] 78905ce - [CIR] Upstream support for logical not operations (#133966)

2025-04-04 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-04T17:36:14-07:00 New Revision: 78905ce6cbd3fa8f8b467e7cad0e9a093c1b1c44 URL: https://github.com/llvm/llvm-project/commit/78905ce6cbd3fa8f8b467e7cad0e9a093c1b1c44 DIFF: https://github.com/llvm/llvm-project/commit/78905ce6cbd3fa8f8b467e7cad0e9a093c1b1c44.diff L

[clang] [CIR] Upstream support for logical not operations (PR #133966)

2025-04-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/133966 ___ 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-04 Thread Alexander Kornienko via cfe-commits
alexfh wrote: We're seeing another problem after this commit: seemingly bogus `class member cannot be redeclared` errors. I'll try to provide a reduced repro on Monday. https://github.com/llvm/llvm-project/pull/133610 ___ cfe-commits mailing list cfe-

[clang-tools-extra] [clang-tidy] Added Conflicting Global Accesses checker (PR #130421)

2025-04-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,748 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [Clang][SYCL] Add support AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Justin Cai (jzc) Changes This PR adds support for AOT compilation for Intel CPUs and GPUs in clang-sycl-linker. When no `-arch` is passed to `clang-sycl-linker`, the output of the tool will be the resulting linked SPIR-V bytecode.

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #134453 --- Full diff: https://github.com/llvm/llvm-project/pull/134472.diff 6 Files Affected: - (modified) clang/lib/Format/Format.cpp (+1-1) - (modified) clang/lib/Format/FormatToken.cpp (+1-1) -

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-04 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/134472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

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

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/134472 Fix #134453 >From 17ccac23889d377d66d327dbaac7c44fc4207b1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 4 Apr 2025 19:21:55 -0700 Subject: [PATCH] [clang-format] Set C11 instead of C17 for LK_C Fix #13445

[clang] [clang-format] Merge inline short functions for BS_Whitesmiths (PR #134473)

2025-04-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/134473 Fix 126747 >From 12acc02f8ffd2317ed1197d7397cb1abc1a4fd07 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 4 Apr 2025 19:31:12 -0700 Subject: [PATCH] [clang-format] Merge inline short functions for BS_Whitesm

[clang] [clang-format] Merge inline short functions for BS_Whitesmiths (PR #134473)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix 126747 --- Full diff: https://github.com/llvm/llvm-project/pull/134473.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineFormatter.cpp (+7-2) - (modified) clang/unittests/Format/Form

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes With implicitly-built modules, seeing something like: ``` fatal error: module 'X' is defined in both '/HASH1/X-HASH2.pcm' and '/HASH1/X-HASH3.pcm' ``` is super confusing and not actionable,

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes With implicitly-built modules, seeing something like: ``` fatal error: module 'X' is defined in both '/HASH1/X-HASH2.pcm' and '/HASH1/X-HASH3.pcm' ``` is super confusing and not acti

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/134475 With implicitly-built modules, seeing something like: ``` fatal error: module 'X' is defined in both '/HASH1/X-HASH2.pcm' and '/HASH1/X-HASH3.pcm' ``` is super confusing and not actionable, because the modu

[clang] [llvm] [Clang][NVVM] Support `-f[no-]cuda-prec-sqrt` and propagate precision flag to `NVVMReflect` (PR #134244)

2025-04-04 Thread via cfe-commits
Lai-YT wrote: > At first glance, it seems like a good idea to allow people to choose how > their square roots are lowered on a per-function level: some code cares about > precise square roots, some doesn't, and you should be able to make choices on > a case-by-case basis. > > But looking at t

<    3   4   5   6   7   8   9   >