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

2025-04-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/135046 This fixes a warning where a variable assigned in a 'if' statement wasn't referenced again. >From efc3cdc2f0949ab3a3369dd0dd6da394974342ed Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 9 Apr 2025 09

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

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

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

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This fixes a warning where a variable assigned in a 'if' statement wasn't referenced again. --- Full diff: https://github.com/llvm/llvm-project/pull/135046.diff 1 Files Affected: - (modified) clang/lib/

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

2025-04-09 Thread Aaron Ballman via cfe-commits
AaronBallman 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

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

2025-04-09 Thread Paul Walker via cfe-commits
@@ -2641,6 +2641,20 @@ static std::optional instCombineDMB(InstCombiner &IC, return std::nullopt; } +static std::optional instCombinePTrue(InstCombiner &IC, + IntrinsicInst &II) { + IRBuilder<> Builder(&II); + auto Type

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

2025-04-09 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/135016 ___ 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
@@ -2,22 +2,33 @@ ! invocation. These libraries are added on top of other standard runtime ! libraries that the Clang driver will include. -! RUN: %flang -### --target=ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,UNIX-F128NONE -! RUN:

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread Alexey Bataev via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread Alexey Bataev via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

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

2025-04-09 Thread Shilei Tian via cfe-commits
@@ -27,7 +27,7 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, // position of memory order and scope arguments in the builtin unsigned OrderIndex, ScopeIndex; - const auto *FD = SemaRef.getCurFunctionDecl(); + const auto *FD = SemaRef.getCurFuncti

[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 updated https://github.com/llvm/llvm-project/pull/134362 >From cd100a70479adbb4619d685e345485eea99987c5 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Fri, 4 Apr 2025 06:10:56 -0400 Subject: [PATCH 1/7] [driver] Generalize adding the path of libflang_rt.runtime

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

2025-04-09 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,24 @@ +// REQUIRES: amdgpu-registered-target arsenm wrote: Don't think it actually does https://github.com/llvm/llvm-project/pull/135027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

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

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

2025-04-09 Thread Alexey Bataev via cfe-commits
@@ -4528,6 +4528,115 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dyn_cast(SubExpr

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

2025-04-09 Thread Paul Walker via cfe-commits
@@ -2641,6 +2641,20 @@ static std::optional instCombineDMB(InstCombiner &IC, return std::nullopt; } +static std::optional instCombinePTrue(InstCombiner &IC, + IntrinsicInst &II) { + IRBuilder<> Builder(&II); + auto Type

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

2025-04-09 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/135000 ___ 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 Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/135035 Based on the documentation, it can be argued that SpaceAfterLogicalNot doesn't cover the alternative operator `not`. Closes #125465 >From c8dab20224467ab0fea8fccf9d55da7417ae0089 Mon Sep 17 00:00:00 2001 From:

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

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Based on the documentation, it can be argued that SpaceAfterLogicalNot doesn't cover the alternative operator `not`. Closes #125465 --- Full diff: https://github.com/llvm/llvm-project/pull/135035.diff 2

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

2025-04-09 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-04-09T15:52:25+01:00 New Revision: b0338c3d6c6d9787232e07ceff56ef161c357602 URL: https://github.com/llvm/llvm-project/commit/b0338c3d6c6d9787232e07ceff56ef161c357602 DIFF: https://github.com/llvm/llvm-project/commit/b0338c3d6c6d9787232e07ceff56ef161c357602.diff

[clang] [clang-format] Handle C++ keywords in other languages better (PR #132941)

2025-04-09 Thread via cfe-commits
sstwcw wrote: Can you have a look again? I rushed last time. I updated the patch and then merged into the main branch right away. There were formatting problems. https://github.com/llvm/llvm-project/pull/132941 ___ cfe-commits mailing list cfe-comm

[clang] [clang-format] Handle C++ keywords in other languages better (PR #132941)

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

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

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

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-04-09 Thread Yaxun Liu via cfe-commits
@@ -43,6 +43,33 @@ using namespace clang; using namespace CodeGen; using namespace llvm; +/// Some builtins do not have library implementation on some targets and +/// are instead emitted as LLVM IRs by some target builtin emitters. +/// FIXME: Remove this when library support

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

[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
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/106321 >From e10de17bf7e56cfe50c144e82396851a47ceead5 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 15 Aug 2024 16:33:04 -0700 Subject: [PATCH] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on po

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

2025-04-09 Thread Erich Keane via cfe-commits
erichkeane wrote: > > 2- This patch adds the infrastructure/calls to do the > > OpenACCDialect->LLVM-IR lowering. Unfortunately only a handful of > > constructs are actually functional in the OpenACC dialect, of which data is > > one (hence the choice to do it here, and why I chose to do it as

[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-09 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132778 >From 0aa1e7b83888bde7112327fba7db9bdcb71c43d9 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 16:28:28 + Subject: [PATCH 1/6] [clang] Implement CWG2815 CWG2815 "Overload resolution for refe

[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] [clang][index] Handle undefined function-like macros in single file parse mode (PR #135054)

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

[clang] [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (PR #134951)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Akira Hatanaka (ahatanak) Changes Fixes https://github.com/llvm/llvm-project/issues/123146. rdar://138851576 --- Full diff: https://github.com/llvm/llvm-project/pull/134951.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaCodeCom

[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-09 Thread via cfe-commits
@@ -47,6 +47,28 @@ void f() { #endif } // namespace cwg2813 +namespace cwg2815 { // cwg2815: 21 +#if __cplusplus >= 201703L +int arg() noexcept; + +int f(int (&)() noexcept); +void f(int (&)()); +int i = f(arg); + +int g(int (*)() noexcept); +void g(int (&)()); +int j = g(arg)

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

2025-04-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` running on `suse-gary-m68k-cross` while building `clang` at step 4 "build stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/8369 Here is the relevant piece o

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

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

[clang] [HLSL] Resource initialization by constructors (PR #135120)

2025-04-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/135120 >From 85001dcbc184491dfb24e9d2a39df46fd4c9a363 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 9 Apr 2025 18:17:26 -0700 Subject: [PATCH 1/3] Initialize resources by constructors - add resource record con

[clang] [HLSL] Resource initialization by constructors (PR #135120)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes - Adds resource constructor that takes explicit binding for all resource classes. - Updates implementation of default resource constructor to initialize resource handle to `poison`. - Removes initialization o

[clang] [HLSL] Resource initialization by constructors (PR #135120)

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

[clang] [HLSL] Resource initialization by constructors (PR #135120)

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

[clang] [llvm] MCAsmStreamer: Replace the MCInstPrinter * parameter with unique_ptr (PR #135128)

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

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-04-09 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/130734 >From 0f6ff605da3cbadc5311d4bf6c08fe98970a69c3 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Thu, 10 Apr 2025 09:54:33 +0800 Subject: [PATCH 1/2] [Clang][CodeGen] Do not set inbounds flag for struct GEP wi

[clang] [llvm] reduce over divergent mask (PR #133228)

2025-04-09 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 updated https://github.com/llvm/llvm-project/pull/133228 >From c8989dc07dec2af1ecc7e8fd07e422e760d3bfb6 Mon Sep 17 00:00:00 2001 From: anikelal Date: Tue, 8 Apr 2025 14:14:10 +0530 Subject: [PATCH] reduce wrt divergent mask --- clang/include/clang/Basic/BuiltinsA

[clang] [llvm] reduce max wrt divergent mask (PR #135138)

2025-04-09 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 created https://github.com/llvm/llvm-project/pull/135138 None >From 810ad9859bbcd66d6942e497c25bdde27978bf3c Mon Sep 17 00:00:00 2001 From: anikelal Date: Wed, 9 Apr 2025 11:24:21 +0530 Subject: [PATCH] reduce max wrt divergent mask --- clang/include/clang/Basic

[clang] Treat ipynb as json (PR #135137)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Tim Clephas (Timple) Changes Fixes #110727 I do not have merge access on this repository. So please merge if approved. --- Full diff: https://github.com/llvm/llvm-project/pull/135137.diff 1 Files Affected: - (modified) clang/lib

[clang] [llvm] reduce max wrt divergent mask (PR #135138)

2025-04-09 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp llvm/lib

[clang] Treat ipynb as json (PR #135137)

2025-04-09 Thread Tim Clephas via cfe-commits
https://github.com/Timple created https://github.com/llvm/llvm-project/pull/135137 Fixes #110727 I do not have merge access on this repository. So please merge if approved. >From a924a68f906a14ee479b547658f6633328427ecd Mon Sep 17 00:00:00 2001 From: Tim Clephas Date: Thu, 10 Apr 2025 08:53:2

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

2025-04-09 Thread Jason Rice via cfe-commits
https://github.com/ricejasonf updated https://github.com/llvm/llvm-project/pull/135129 >From 1597be864b8617a6e325590b742746572df0d78e Mon Sep 17 00:00:00 2001 From: Jason Rice Date: Wed, 9 Apr 2025 21:31:00 -0700 Subject: [PATCH] [Clang][P1061] Fix invalid pack binding crash --- clang/include

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

2025-04-09 Thread Erich Keane via cfe-commits
@@ -200,6 +200,105 @@ void CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd, } } +mlir::Operation *CIRGenModule::getGlobalValue(StringRef name) { + mlir::Operation *global = mlir::SymbolTable::lookupSymbolIn(theModule, name); + if (!global)

[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-09 Thread Sam Elliott via cfe-commits
@@ -940,6 +947,14 @@ struct RISCVOperand final : public MCParsedAsmOperand { [](int64_t Imm) { return Imm != INT64_MIN && isInt<5>(Imm - 1); }); } + bool isSImm18() const { return isBareSimmNLsbK<18, 0>(); } + + bool isSImm18Lsb0() const { return isBareSimmNLsb0<18

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-09 Thread Matheus Izvekov via cfe-commits
@@ -18,19 +18,19 @@ int D = 1; #pragma data_seg(".data") int a = 1; extern const Mutable mutable_custom_section; -const Mutable mutable_custom_section; // expected-warning {{`#pragma const_seg` for section ".my_const" will not apply to 'mutable_custom_section' due to the pres

[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
delcypher wrote: @Sirraide Apologies for taking so long to get back to this PR. I think I've addressed all your feedback now. Is this ok to land now? https://github.com/llvm/llvm-project/pull/106321 ___ cfe-commits mailing list cfe-commits@lists.llvm.

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

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Morris Hafner (mmha) Changes This patch adds `VisitBinAssign` and `VisitBinComma` to the ClangIR `ScalarExprEmitter` to enable assignments and the comma operator. --- Full diff: https://github.com/llvm/llvm-project/pull/135115.diff 8 Fi

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

2025-04-09 Thread Morris Hafner via cfe-commits
mmha wrote: cc @erichkeane @andykaylor @dkolsen-pgi 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] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-04-09 Thread Yingwei Zheng via cfe-commits
@@ -42,6 +42,11 @@ Potentially Breaking Changes C/C++ Language Potentially Breaking Changes --- +- Some old-style offsetof idioms like ``((int)(&(((struct S *)0)->field)))`` are treated dtcxzyw wrote: Fixed. https://g

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

2025-04-09 Thread via cfe-commits
@@ -1959,6 +1964,52 @@ the configuration (without a prefix: ``Auto``). }; void f() { bar(); } + Also can be specified as a nested configuration flag: + + .. code-block:: c++ + +# Example of usage: +AllowShortFunctionsOnASingleLine: InlineOnly + +# or

[clang] [cfi][NFCI] Precommit tests to show nomerge functionality (PR #135104)

2025-04-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/135104 ___ 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 Owen Pan via cfe-commits
https://github.com/owenca demilestoned 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] [CIR] Upstream binary assignments and comma (PR #135115)

2025-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane 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] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-09 Thread via cfe-commits
@@ -1959,6 +1964,52 @@ the configuration (without a prefix: ``Auto``). }; void f() { bar(); } + Also can be specified as a nested configuration flag: + + .. code-block:: c++ + +# Example of usage: +AllowShortFunctionsOnASingleLine: InlineOnly + +# or

[clang] d1badf5 - [cfi][NFCI] Precommit tests to show nomerge functionality (#135104)

2025-04-09 Thread via cfe-commits
Author: Thurston Dang Date: 2025-04-09T19:46:59-07:00 New Revision: d1badf5635c5876a8c0b9558fe149ef0e293b865 URL: https://github.com/llvm/llvm-project/commit/d1badf5635c5876a8c0b9558fe149ef0e293b865 DIFF: https://github.com/llvm/llvm-project/commit/d1badf5635c5876a8c0b9558fe149ef0e293b865.diff

[clang] [HLSL] Resource initialization by constructors (PR #135120)

2025-04-09 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/135120 >From 85001dcbc184491dfb24e9d2a39df46fd4c9a363 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 9 Apr 2025 18:17:26 -0700 Subject: [PATCH 1/2] Initialize resources by constructors - add resource record con

[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
@@ -850,6 +852,21 @@ void ToolChain::addFortranRuntimeLibraryPath(const llvm::opt::ArgList &Args, CmdArgs.push_back(Args.MakeArgString("-L" + DefaultLibPath)); } +void ToolChain::addFlangRTLibPath(const ArgList &Args, + llvm::opt::ArgStrin

[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
@@ -7,35 +7,106 @@ !! LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON, use !! resource_dir_with_per_target_subdir as inputs. -! Check powerpc64-ibm-aix 64-bit linking to static flang-rt +! Check powerpc64-ibm-aix 64-bit linking to static flang-rt by default ! RUN: %flang %s -### 2>&1

[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
@@ -7,35 +7,106 @@ !! LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON, use !! resource_dir_with_per_target_subdir as inputs. -! Check powerpc64-ibm-aix 64-bit linking to static flang-rt +! Check powerpc64-ibm-aix 64-bit linking to static flang-rt by default ! RUN: %flang %s -### 2>&1

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

2025-04-09 Thread via cfe-commits
@@ -1959,6 +1964,52 @@ the configuration (without a prefix: ``Auto``). }; void f() { bar(); } + Also can be specified as a nested configuration flag: + + .. code-block:: c++ + +# Example of usage: +AllowShortFunctionsOnASingleLine: InlineOnly + +# or

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

2025-04-09 Thread Aaron Ballman via cfe-commits
@@ -1523,7 +1523,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { // Out-of-line definitions shouldn't be pushed into scope in C++, unless they // are function-local declarations. - if (getLangOpts().CPlusPlus && D->isOutOfLine() && !S->get

[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 updated https://github.com/llvm/llvm-project/pull/134345 >From c5f843152d035f4671d132d3844ea1f18be703fe 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] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #135030)

2025-04-09 Thread via cfe-commits
https://github.com/jadhbeika created https://github.com/llvm/llvm-project/pull/135030 Supersedes #128742 — moved to a feature branch as per contribution best practices. Carrying over all feedback from @jplehr and @mjklemm. This PR updates the parsing, sema support for OpenMP Nowait clause which

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

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

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

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: None (jadhbeika) Changes Supersedes #128742 — moved to a feature branch as per contribution best practices. Carrying over all feedback from @jplehr and @mjklemm. This PR updates the parsing, sema support

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes We were passing the address of a local variable to a call to Diag() which then tried to use the object after its lifetime ended, resulting in crashes. We no longer pass the temporary object any longer.

[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 updated https://github.com/llvm/llvm-project/pull/134362 >From cd100a70479adbb4619d685e345485eea99987c5 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Fri, 4 Apr 2025 06:10:56 -0400 Subject: [PATCH 1/6] [driver] Generalize adding the path of libflang_rt.runtime

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/135013 >From 99190952174f334642ec237596969f9b0c846411 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 9 Apr 2025 09:51:49 -0400 Subject: [PATCH 1/2] Fix crash with align_value diagnostic reporting We were

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

2025-04-09 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt closed 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] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

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

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-09 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: The general idea here makes sense. https://github.com/llvm/llvm-project/pull/135064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-09 Thread Eli Friedman via cfe-commits
@@ -485,6 +485,24 @@ ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty, bool IsVariadicFn, } Size = llvm::alignTo(Size, Alignment); +// If the Aggregate is made up of pointers, use an array of pointers for the +// coerced type. This prevents having

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

2025-04-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/134998 Previously, the enumerators were being added both to the class context and to the namespace scope. e.g., we accepted this invalid code: ``` struct A { enum E : int; }; enum A::E : int { e1 = 100

[libclc] libclc: clspv: fma: remove fp16 implementation (PR #135002)

2025-04-09 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr created https://github.com/llvm/llvm-project/pull/135002 clspv is already handling generation of fp16. This implementation is preventing clspv from making the best choice to use an emulation on top of fp32-fma, or the native fp16-fma, depending on the command-line

[libclc] libclc: clspv: fma: remove fp16 implementation (PR #135002)

2025-04-09 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: @frasercrmck , could you please review, and merge when approved? Thank you 🙏 https://github.com/llvm/llvm-project/pull/135002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [HIP] use offload wrapper for non-device-only non-rdc (PR #132869)

2025-04-09 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/132869 ___ 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 via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Juan Manuel Martinez Caamaño (jmmartinez) Changes `Sema::getCurFunctionDecl(AllowLambda = false)` returns a nullptr when the lambda declaration is outside a function (for example, when assigning a lambda to a static constexpr var

[clang] [compiler-rt] [libc] [libcxx] [llvm] [AMDGPU] Fix code object version not being set to 'none' (PR #135036)

2025-04-09 Thread Joseph Huber via cfe-commits
@@ -62,7 +62,7 @@ Value *EmitAMDGPUWorkGroupSize(CodeGenFunction &CGF, unsigned Index) { auto Cov = CGF.getTarget().getTargetOpts().CodeObjectVersion; - if (Cov == CodeObjectVersionKind::COV_None) { + if (Cov == CodeObjectVersionKind::COV_None && !CGF.getLangOpts().OpenM

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

2025-04-09 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/134998 >From 6864d9e8c5d20830adbe6bf226943041ebacf5e1 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 9 Apr 2025 08:35:40 -0400 Subject: [PATCH 1/2] No longer add enumeration constants to the wrong scope

[clang] [OpenACC][CIR] Implement 'data' construct lowering, lower OACC->LLVMIR (PR #135038)

2025-04-09 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: > 2- This patch adds the infrastructure/calls to do the OpenACCDialect->LLVM-IR > lowering. Unfortunately only a handful of constructs are actually functional > in the OpenACC dialect, of which data is one (hence the choice to do it here, > and why I chose to do it as one pat

[clang] [compiler-rt] [libc] [libcxx] [llvm] [AMDGPU] Fix code object version not being set to 'none' (PR #135036)

2025-04-09 Thread Joseph Huber via cfe-commits
@@ -62,7 +62,7 @@ Value *EmitAMDGPUWorkGroupSize(CodeGenFunction &CGF, unsigned Index) { auto Cov = CGF.getTarget().getTargetOpts().CodeObjectVersion; - if (Cov == CodeObjectVersionKind::COV_None) { + if (Cov == CodeObjectVersionKind::COV_None && !CGF.getLangOpts().OpenM

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

2025-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited 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] [OpenACC][CIR] Implement 'data' construct lowering (PR #135038)

2025-04-09 Thread Valentin Clement バレンタイン クレメン via cfe-commits
clementval wrote: > > > 2- This patch adds the infrastructure/calls to do the > > > OpenACCDialect->LLVM-IR lowering. Unfortunately only a handful of > > > constructs are actually functional in the OpenACC dialect, of which data > > > is one (hence the choice to do it here, and why I chose to

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

2025-04-09 Thread Richard Smith via cfe-commits
zygoloid wrote: This came up on the core reflector again just yesterday; would be worth asking there. https://github.com/llvm/llvm-project/pull/134998 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[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 updated https://github.com/llvm/llvm-project/pull/135038 >From d175c7cb2de79731f5b5009bb08cc76f971b3e0a Mon Sep 17 00:00:00 2001 From: erichkeane Date: Tue, 8 Apr 2025 17:54:00 -0700 Subject: [PATCH 1/3] [OpenACC][CIR] Implement 'data' construct lowering, lower OA

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-04-09 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -res-may-alias -finclude-default-header -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=FLAG farzonl wrote: did you want to change these to `clang_dxc` aswell since

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

2025-04-09 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/135054 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, where

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-04-09 Thread Deric C. via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -res-may-alias -finclude-default-header -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=FLAG Icohedron wrote: Yea I will change these to clang_dxc https://github.c

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

2025-04-09 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/133822 >From b5798e04281fb6d9475a1ae6af8b94bc0ed85a43 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 31 Mar 2025 23:17:47 + Subject: [PATCH 1/3] [clang] Check `std::initializer_list` more strictly Require `st

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

2025-04-09 Thread via cfe-commits
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_UAV || CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = Cu

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

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

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

2025-04-09 Thread Chris B via cfe-commits
@@ -89,37 +88,178 @@ bool RootSignatureParser::parseDescriptorTableClause() { CurToken.TokKind == TokenKind::kw_UAV || CurToken.TokKind == TokenKind::kw_Sampler) && "Expects to only be invoked starting at given keyword"); + TokenKind ParamKind = Cu

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

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Previously, the enumerators were being added both to the class context and to the namespace scope. e.g., we accepted this invalid code: ``` struct A { enum E : int; }; enum A::E : int { e1 =

[clang] 6e7c40b - [OpenACC][CIR] Initial patch to do OpenACC->IR lowering (#134936)

2025-04-09 Thread via cfe-commits
Author: Erich Keane Date: 2025-04-09T06:05:31-07:00 New Revision: 6e7c40b83de8290d081bcd72b1c57e30aeb28989 URL: https://github.com/llvm/llvm-project/commit/6e7c40b83de8290d081bcd72b1c57e30aeb28989 DIFF: https://github.com/llvm/llvm-project/commit/6e7c40b83de8290d081bcd72b1c57e30aeb28989.diff L

[clang] [OpenACC][CIR] Initial patch to do OpenACC->IR lowering (PR #134936)

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

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

2025-04-09 Thread Zahira Ammarguellat via cfe-commits
=?utf-8?q?Mészáros?= Gergely ,Gergely Meszaros ,Gergely Meszaros Message-ID: In-Reply-To: zahiraam wrote: > Don't know what's up with buildkite, it looks as if it doesn't like multiple > commits? The commit ID its trying to check out is the first in the series, > but `git fetch -v --prune -

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

2025-04-09 Thread Andy Kaylor 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(); +

<    1   2   3   4   5   >