[clang] [clang][bytecode] Fix comparing the addresses of union members (PR #133852)

2025-04-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/133852 >From 2bad7af8f9fef1d7497183d0cb30df05eee00978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 1 Apr 2025 06:07:19 +0200 Subject: [PATCH] [clang][bytecode] Fix comparing the addresses of

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-04-04 Thread Martin Uecker via cfe-commits
uecker wrote: > > Once that is settled, then go back to work on redeclaration/definition > support. Possibly it'd be good to pause and ask the standards body to clarify > how it's supposed to work first. While I think my proposed semantics above > make sense, the standard doesn't actually _sp

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

2025-04-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,29 @@ +//===- SemaDirectX.h - Semantic Analysis for DirectX +// constructs===// farzonl wrote: good catch. no this should be one line https://github.com/llvm/llvm-project/pull/134439 ___ cfe-

[clang] Hlsl dst function (PR #133828)

2025-04-04 Thread via cfe-commits
@@ -35,6 +35,12 @@ length_vec_impl(vector X) { #endif } +template +constexpr vector dst_impl(vector src0, vector src1) { + vector dest = {1, src0[1] * src1[1], src0[2], src1[3]}; + return dest; +} metkarpoonam wrote: Thanks for the feedback! I've made the

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

2025-04-04 Thread Helena Kotas 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 Andy Kaylor via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

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

2025-04-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota 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 Helena Kotas via cfe-commits
@@ -0,0 +1,29 @@ +//===- SemaDirectX.h - Semantic Analysis for DirectX +// constructs===// hekota wrote: Is this supposed to be on 2 lines? https://github.com/llvm/llvm-project/pull/134439 ___ cfe-commi

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

2025-04-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! Just a few comments. 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 Helena Kotas via cfe-commits
@@ -0,0 +1,23 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 hekota wrote: The filename should probably be dot2add.hlsl. https://github.com/llvm/llvm-project/pull/134439 __

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

2025-04-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,23 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 farzonl wrote: No this is a c only test. Since we are exposing the backend api as a target any frontend is technically suppose to be able to ac

[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] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/134181 >From 54454e4d52570f29c493c41fc9bf95cbaf9e0886 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 21 Mar 2025 09:46:27 -0700 Subject: [PATCH 1/4] [CIR] Upstream support for break and continue statements T

[clang] 412f7fa - [clang] Bump DIAG_SIZE_PARSE as we're hitting the limit downstream as of 6263de90df7f58c8b98475024d5eef102e10a372.

2025-04-04 Thread Jorge Gorbe Moya via cfe-commits
Author: Jorge Gorbe Moya Date: 2025-04-04T14:39:57-07:00 New Revision: 412f7fa31607489dc400321968a70e114463b374 URL: https://github.com/llvm/llvm-project/commit/412f7fa31607489dc400321968a70e114463b374 DIFF: https://github.com/llvm/llvm-project/commit/412f7fa31607489dc400321968a70e114463b374.di

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

2025-04-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl 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] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kaitlin Peng (kmpeng) Changes Closes #99156. Tasks completed: - Implement `smoothstep` using HLSL source in `hlsl_intrinsics.h` - Implement the `smoothstep` SPIR-V target built-in in `clang/include/clang/Basic/BuiltinsSPIRV.td` -

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-04-04 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm created https://github.com/llvm/llvm-project/pull/133578 Although combining -fveclib=ArmPL with -nostdlib is a rare situation, it should still be supported correctly and should effect in avoidance of linking against libm. >From c033be3cf15b3320b24d52f2414acf88ba

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-04-04 Thread Shilei Tian 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?= Message-ID: In-Reply-To: https://github.com/shiltian approved this pull request. https://github.com/llv

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-04-04 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1079 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- tablegen -*-===// +// +// 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: A

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

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

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-04 Thread Reid Kleckner via cfe-commits
rnk wrote: We have internal reports of incorrect mangling substitutions after updating to 537b6541e8067d7ef7aa38791989fca6303b7fd from 799e9053641a6478d3144866a97737b37b87c260, and this change seems like the likely culprit because it's touching the Itanium mangling code. We'll see if that can

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

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

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

2025-04-04 Thread via cfe-commits
flovent wrote: @steakhal Thank you for review! I forgot to mention that the testcases added is copied from their non-range verison since they have same effect to iterator which mentioned in PR description, the only change is the method's name and a parameter named `vec` in test function to sim

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

2025-04-04 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,135 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// Dumps deserialized declarations. ilya-biryukov wrote: I still see the old version. Did the push succeed? https://github.com/llvm/llvm-project/pull/133910

[clang] [clang][diagnostics] Update note_constexpr_invalid_cast to use enum_select and adjust its uses (PR #130868)

2025-04-04 Thread Ayokunle Amodu via cfe-commits
ayokunle321 wrote: @erichkeane CI is happy now! For future patches, I was wondering if to separate them like this so reviews could be easier or I should just do it all in one PR. https://github.com/llvm/llvm-project/pull/130868 ___ cfe-commits mailing

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

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

[clang-tools-extra] [clang-tidy] Fixed bugprone-non-zero-enum-to-bool-conversion (PR #131407)

2025-04-04 Thread Piotr Zegar via cfe-commits
@@ -126,4 +126,10 @@ void testCustomOperator(CustomOperatorEnum e) { if (!(e & E1)) {} } +enum EmptyEnum {}; + +bool testCustomOperator(EmptyEnum value) { PiotrZSL wrote: Because this is enum without enumerators = can hold any value = usually used to wor

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -193,8 +334,23 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { switch (op) { case UO_Deref: { -cgm.errorNYI(e->getSourceRange(), "UnaryOp dereference"); -return LValue(); +QualType t = e->getSubExpr()->getType()->getPointeeType(); +

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM pending discussion with Eli https://github.com/llvm/llvm-project/pull/134317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

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

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

[clang] [C23] Allow casting from a null pointer constant to nullptr_t (PR #133742)

2025-04-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/133742 C23 allows a cast of a null pointer constant to nullptr_t. e.g., (nullptr_t)0 or (nullptr_t)(void *)0. Fixes #133644 >From 5ad66ec7a9ea76a080ee34ddf0d68a19dbb9dec6 Mon Sep 17 00:00:00 2001 From: Aaron Bal

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

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes When unary operation support was initially upstreamed, the cir.cast operation hadn't been upstreamed yet, so logical not wasn't included. Since casts have now been added, this change adds support for logic

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

2025-04-04 Thread Mateusz Mikuła via cfe-commits
https://github.com/mati865 created https://github.com/llvm/llvm-project/pull/134458 This is part of the fixes from https://github.com/mati865/llvm-project/commits/cygwin-more-fixes/ that I consider good enough to upstream. The other branch with hacky changes even goes as far as making Clang

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

2025-04-04 Thread via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the foll

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

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes When unary operation support was initially upstreamed, the cir.cast operation hadn't been upstreamed yet, so logical not wasn't included. Since casts have now been added, this change adds support for log

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

2025-04-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/133966 >From 4c71a107d174b24b4515554c4be57a2a318f5fb9 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 1 Apr 2025 11:47:49 -0700 Subject: [PATCH] [CIR] Upstream support for logical not operations When unary op

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

2025-04-04 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] [Hlsl] Implement the dst HLSL Function (PR #133828)

2025-04-04 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] [LLVM][Clang][Cygwin] Fix Cygwin builds (PR #134458)

2025-04-04 Thread via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Mateusz Mikuła (mati865) Changes This is part of the fixes from https://github.com/mati86

[clang] cuda clang: Clean up test dependency for CUDA surfaces (PR #134459)

2025-04-04 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh created https://github.com/llvm/llvm-project/pull/134459 https://github.com/llvm/llvm-project/pull/132883 added support for cuda surfaces but reached into clang/test/Headers/ from clang/test/CodeGen/ to grab the minimal cuda.h. Duplicate that file instead based

[clang] cuda clang: Clean up test dependency for CUDA surfaces (PR #134459)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Austin Schuh (AustinSchuh) Changes https://github.com/llvm/llvm-project/pull/132883 added support for cuda surfaces but reached into clang/test/Headers/ from clang/test/CodeGen/ to grab the minimal cuda.h. Duplicate that file instead bas

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-04-04 Thread Austin Schuh via cfe-commits
@@ -0,0 +1,3329 @@ +// RUN: %clang_cc1 -triple nvptx-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -fcuda-is-device -O3 -o - %s -emit-llvm | FileCheck %s +#include "../Headers/Inputs/include/cuda.h" ---

[clang] cuda clang: Clean up test dependency for CUDA surfaces (PR #134459)

2025-04-04 Thread Austin Schuh via cfe-commits
AustinSchuh wrote: @slackito and @Artem-B , hopefully this addresses your feedback! https://github.com/llvm/llvm-project/pull/134459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-04 Thread via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-llvm-support @llvm/pr-subscribers-clang Author: Mateusz Mikuła (mati865) Changes This is part of the fixes from

[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/5] [Clang][Cygwin] Enable few conditions that

[clang] cuda clang: Clean up test dependency for CUDA surfaces (PR #134459)

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

[clang] cuda clang: Clean up test dependency for CUDA surfaces (PR #134459)

2025-04-04 Thread Jorge Gorbe Moya via cfe-commits
https://github.com/slackito approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/134459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    4   5   6   7   8   9