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

2025-04-10 Thread Oliver Hunt via cfe-commits
@@ -16421,33 +16715,70 @@ CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) { return true; auto *MD = dyn_cast(FnDecl); + auto ConstructDestroyingDeleteAddressType = [&]() { +assert(MD); +return SemaRef.Context.getCanonicalType(SemaRef.Context

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

2025-04-10 Thread Mateusz Mikuła via cfe-commits
@@ -106,7 +106,7 @@ if (LLVM_EXPORTED_SYMBOL_FILE) DEPENDS ${LIBCLANG_VERSION_SCRIPT_FILE}) endif() -if(LLVM_ENABLE_PIC OR (WIN32 AND NOT LIBCLANG_BUILD_STATIC)) +if(LLVM_ENABLE_PIC OR ((WIN32 OR CYGWIN) AND NOT LIBCLANG_BUILD_STATIC)) mat

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

2025-04-10 Thread via cfe-commits
eaeltsin wrote: We are now seeing non-determinism in `.pcm` files that root-causes to this commit. @mizvekov - might it be something obvious, like pointer-keyed containers or similar? https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-10 Thread Jan Svoboda via cfe-commits
@@ -90,63 +90,132 @@ static bool checkHeaderSearchPaths(const HeaderSearchOptions &HSOpts, using PrebuiltModuleFilesT = decltype(HeaderSearchOptions::PrebuiltModuleFiles); -/// A listener that collects the imported modules and optionally the input -/// files. +/// A listene

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

2025-04-10 Thread Srinivasa Ravi via cfe-commits
https://github.com/Wolfram70 updated https://github.com/llvm/llvm-project/pull/134345 >From 648bfd77d48c395ae81a1d28fa6d925e1e75c02a Mon Sep 17 00:00:00 2001 From: Srinivasa Ravi Date: Wed, 5 Mar 2025 12:35:39 +0530 Subject: [PATCH] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants Th

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/135041 >From 9e923b1fe683dea499f7557a48d97aa6d2469c07 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Wed, 9 Apr 2025 09:02:17 -0700 Subject: [PATCH 1/4] [MS][clang] Error about ambigous operator delete

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

2025-04-10 Thread Srinivasa Ravi via cfe-commits
https://github.com/Wolfram70 updated https://github.com/llvm/llvm-project/pull/134345 >From 1f59834f760c7880bd958f82853f253816b1e653 Mon Sep 17 00:00:00 2001 From: Srinivasa Ravi Date: Wed, 5 Mar 2025 12:35:39 +0530 Subject: [PATCH] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants Th

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

2025-04-10 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann edited https://github.com/llvm/llvm-project/pull/133030 ___ 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-10 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?= Message-ID: In-Reply-To: https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/135027 ___ cfe-commits

[clang] [CodeGen] Change placeholder from `undef` to `poison` (PR #134731)

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

[clang] [clang-tools-extra] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)

2025-04-10 Thread Erich Keane via cfe-commits
@@ -493,8 +493,8 @@ DeduceNullPtrTemplateArgument(Sema &S, TemplateParameterList *TemplateParams, : CK_NullToPointer) .get(); return DeduceNonTypeTemplateArgument( - S, TemplateParams, NTTP, Ded

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

2025-04-10 Thread Alex Voicu via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) AlexVlx w

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

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

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

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

2025-04-10 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-10 Thread Ashley Coleman via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s + + +// CHECK-LABEL: linkonce_odr noundef nofpclass(nan inf) <4 x float> @_ZN4hlsl8__detail8dst

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

2025-04-10 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: Refer to target region codegen https://github.com/llvm/llvm-project/pull/131838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-10 Thread Alex Voicu via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) AlexVlx w

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

2025-04-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-win-x-armv7l` running on `as-builder-1` while building `clang` at step 10 "test-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/38/builds/2834 Here is the relevant piece of th

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

2025-04-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/8] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [clang] Make tests write to /dev/null if output is not needed (PR #135242)

2025-04-10 Thread Pranav Kant via cfe-commits
https://github.com/pranavk closed https://github.com/llvm/llvm-project/pull/135242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Richard Smith via cfe-commits
zygoloid wrote: > But if we want relocatable modules without using `-fmodules-embed-all-files` > though, is there a solution for that? Do you use `-no-canonical-prefixes`? https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list

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

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-04-10 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > I still have a few things to investigate to make sure of what is happening, > but in the meantime would you guys approve to land this patch to make the > implementation more stable whether the device supports denorm or not? > > ``` > - __CLC_INTN is_inf_nan_or_zero = > -

[clang] [llvm] Add clang driver changes to support MTI RISC-V (PR #134065)

2025-04-10 Thread Djordje Todorovic via cfe-commits
@@ -337,13 +337,17 @@ std::string riscv::getRISCVArch(const llvm::opt::ArgList &Args, // - On `riscv{XLEN}-unknown-elf` we default to `rv{XLEN}imac` // - On all other OSs we use `rv{XLEN}imafdc` (equivalent to `rv{XLEN}gc`) if (Triple.isRISCV32()) { -if (Triple.getOS

[clang-tools-extra] [clang-tidy][NFC] update test name and config for bugprone-unintended-char-ostream-output (PR #134868)

2025-04-10 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ### Merge activity * **Apr 8, 11:45 AM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/134868). https://github.com/llvm/llvm-project/pull/134868

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

2025-04-10 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Looking... Does not reproduce without c++20. 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] [llvm] [DirectX] Use scalar arguments for @llvm.dx.dot intrinsics (PR #134570)

2025-04-10 Thread Farzon Lotfi via cfe-commits
@@ -385,12 +385,17 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, "Intrinsic dot2add is only allowed for dxil architecture"); Value *A = EmitScalarExpr(E->getArg(0)); Value *B = EmitScalarExpr(E->getArg(1)); -Value *C = EmitScalarExpr

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-04-10 Thread Erich Keane via cfe-commits
@@ -47,3 +47,21 @@ namespace InvalidInsertPos { template<> int v; int k = v; } + +namespace GH51347 { + template + auto p = p; // expected-error {{the type of variable template specialization 'p'}} erichkeane wrote: It should be the same/similar as whe

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-10 Thread Artem Belevich via cfe-commits
@@ -1233,6 +1233,10 @@ def offload_compression_level_EQ : Joined<["--"], "offload-compression-level=">, Flags<[HelpHidden]>, HelpText<"Compression level for offload device binaries (HIP only)">; +def offload_jobs_EQ : Joined<["--"], "offload-jobs=">, + HelpText<"Set the

[clang] [CIR] Upstream support for cir.get_global (PR #135095)

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

[clang] [clang] Make tests write to /dev/null if output is not needed (PR #135242)

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

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > Thank you for pointing that out! So IBM still needs Clang to vend this for > now, I take it? Is IBM planning to update their tgmath.h so that it works > with the Clang-based XL compiler (so we can eventually remove Clang's)? The road to being able to retain the

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > I wonder if we can put it into an AIX-only (plus whatever other targets still > need it) include directory, though, so we only find and use it on the targets > where it's necessary? That, or, generally `#include_next` except for certain platforms (like AIX)? ht

[clang] Support '-fmodule-file-home-is-cwd' for C++ header units. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/135147 >From 74e3f0ac74418b3aec2cabde0354623a92303ddc Mon Sep 17 00:00:00 2001 From: Michael Park Date: Thu, 10 Apr 2025 02:01:07 -0700 Subject: [PATCH] Support '-fmodule-file-home-is-cwd' for C++ modules. '-fmodule-fil

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Fix invalid pack binding crash (PR #135129)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jason Rice (ricejasonf) Changes Fixes #134882 Consider ``` struct foo { char a; int b; }; constexpr foo t{'a', 1}; constexpr auto [...m] = t; ``` Without the `constexpr` qualifier, the decomposition declaration just happens to not crash

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-10 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good to me. I have a few comments, but nothing that needs to be changed immediately. https://github.com/llvm/llvm-project/pull/135115 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -807,6 +808,65 @@ class ScalarExprEmitter : public StmtVisitor { VISITCOMP(EQ) VISITCOMP(NE) #undef VISITCOMP + + mlir::Value VisitBinAssign(const BinaryOperator *e) { +const bool ignore = std::exchange(ignoreResultAssign, false); + +mlir::Value rhs; +LValu

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -807,6 +808,65 @@ class ScalarExprEmitter : public StmtVisitor { VISITCOMP(EQ) VISITCOMP(NE) #undef VISITCOMP + + mlir::Value VisitBinAssign(const BinaryOperator *e) { +const bool ignore = std::exchange(ignoreResultAssign, false); + +mlir::Value rhs; +LValu

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

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

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -219,6 +219,13 @@ void CIRGenFunction::emitStoreOfScalar(mlir::Value value, Address addr, assert(!cir::MissingFeatures::opTBAA()); } +void CIRGenFunction::emitStoreThroughBitfieldLValue(RValue src, LValue dst, +mlir::Va

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-10 Thread Andy Kaylor via cfe-commits
@@ -572,6 +575,11 @@ class CIRGenFunction : public CIRGenTypeCache { mlir::LogicalResult emitWhileStmt(const clang::WhileStmt &s); + /// Given an assignment `*lhs = rhs`, emit a test that checks if \p rhs is + /// nonnull, if 1\p LHS is marked _Nonnull. + void emitNullab

[clang] [clang][CodeGen] Add range metadata for atomic load of boolean type. #131476 (PR #133546)

2025-04-10 Thread Jan Górski via cfe-commits
https://github.com/janagor updated https://github.com/llvm/llvm-project/pull/133546 From 4581169d6fbe72357bb83b95fe36c8cc606efa1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20G=C3=B3rski?= Date: Fri, 28 Mar 2025 23:36:18 +0100 Subject: [PATCH 1/8] [clang][CodeGen] Added llvm ir pre-commit tes

<    3   4   5   6   7   8