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

2025-03-10 Thread Shilei Tian via cfe-commits
@@ -1582,6 +1582,26 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, // Implicit copy-assignment gets the same special treatment as implicit // copy-constructors. emitImplicitAssignmentOperatorBody(Args); + } else if (FD->hasAttr() && +

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-03-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux` running on `systemz-1` while building `llvm` at step 4 "build stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/42/builds/3629 Here is the relevant piece of the build log fo

[clang-tools-extra] [clang-tidy] support different precisions (PR #130540)

2025-03-10 Thread Tommy Chen via cfe-commits
@@ -91,8 +91,12 @@ struct MatchBuilder { auto matchMathCall(const StringRef FunctionName, const Matcher ArgumentMatcher) const { +auto HasAnyPrecisionName = +anyOf(hasName(FunctionName), hasName((FunctionName + "l").str()), d

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds the basic support for ArrayType Issue #130197 --- Full diff: https://github.com/llvm/llvm-project/pull/130502.diff 7 Files Affected: - (modified) clang/inc

[clang] [Clang] Fix segmentation fault caused by `VarBypassDetector` stack overflow on deeply nested expressions (PR #124128)

2025-03-10 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb updated https://github.com/llvm/llvm-project/pull/124128 >From 06bf61b6e3900edb99bcbe1c48e1581463f1ec11 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Thu, 23 Jan 2025 16:03:22 +0100 Subject: [PATCH 1/2] [clang] Fix segmentation fault caused by VarBypassDetecto

[clang] [clang][NFC] Clean up Expr::EvaluateAsConstantExpr (PR #130498)

2025-03-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-win` running on `avx512-intel64-win` while building `clang` at step 6 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/81/builds/5064 Here is the relevant pi

[clang] [Clang][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (2/3) (PR #125688)

2025-03-10 Thread Csanád Hajdú via cfe-commits
Il-Capitano wrote: Ping. https://github.com/llvm/llvm-project/pull/125688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e0442bd - [Clang] Fix segmentation fault caused by `VarBypassDetector` stack overflow on deeply nested expressions (#124128)

2025-03-10 Thread via cfe-commits
Author: Boaz Brickner Date: 2025-03-10T09:33:00+01:00 New Revision: e0442bdfa5a5cd02431955cb18b67194d2b82faf URL: https://github.com/llvm/llvm-project/commit/e0442bdfa5a5cd02431955cb18b67194d2b82faf DIFF: https://github.com/llvm/llvm-project/commit/e0442bdfa5a5cd02431955cb18b67194d2b82faf.diff

[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

2025-03-10 Thread Hans Wennborg via cfe-commits
zmodem wrote: Ping? https://github.com/llvm/llvm-project/pull/129255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] NNS: don't print trailing scope resolution operator in diagnostics (PR #130529)

2025-03-10 Thread via cfe-commits
@@ -599,16 +599,17 @@ def err_using_typename_non_type : Error< "'typename' keyword used on a non-type">; def err_using_dependent_value_is_type : Error< "dependent using declaration resolved to type without 'typename'">; -def err_using_decl_nested_name_specifier_is_not_class

[clang] [clang] NNS: don't print trailing scope resolution operator in diagnostics (PR #130529)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/130529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] NNS: don't print trailing scope resolution operator in diagnostics (PR #130529)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Can you add a changelog entry and fix the formating? LGTM otherwise! Thanks https://github.com/llvm/llvm-project/pull/130529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-10 Thread via cfe-commits
@@ -602,6 +602,11 @@ namespace regression3 { template class B {}; template struct A>; } // namespace regression3 +namespace regression4 { cor3ntin wrote: ```suggestion namespace GH130362 { ``` https://github.com/llvm/llvm-project/pull/130447

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/130447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-10 Thread via cfe-commits
@@ -11363,14 +11363,16 @@ class Sema final : public SemaBase { /// The context in which we are checking a template parameter list. enum TemplateParamListContext { -TPC_ClassTemplate, -TPC_VarTemplate, +// For this context, Class, Variable, TypeAlias, and non-pa

[clang] Forbid co_await and co_yield in invalid expr contexts (PR #130455)

2025-03-10 Thread via cfe-commits
cor3ntin wrote: This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, and referencing any Github issue this change fixes. Thanks! https://github.com/llvm/llvm-project/pull/130455 ___

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

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

[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

2025-03-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: I am still concerning about the potential performance loss on using the intrinsic on parameters. Did you have any insight? https://github.com/llvm/llvm-project/pull/129255 ___ cfe-commits mailing list cfe-commi

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

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

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Younan Zhang (zyn0217) Changes Todo: - [x] Adapt the bytecode interpreter to the new evaluation model - [x] Tests for CG & Constant evaluation - [x] Release notes With this patch, the example shown in https://gcc.godbolt.org/z/3

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread Younan Zhang via cfe-commits
@@ -5218,16 +5218,28 @@ static bool EvaluateVarDecl(EvalInfo &Info, const VarDecl *VD) { return true; } +static bool EvaluateDecompositionDeclInit(EvalInfo &Info, + const DecompositionDecl *DD); + static bool EvaluateDecl(EvalInfo &

[clang] 35f273a - [clang][NFC] Clean up Expr::EvaluateAsConstantExpr (#130498)

2025-03-10 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-10T08:56:23+01:00 New Revision: 35f273ab07d9f1e65a662fb25a1aeebaba4552c2 URL: https://github.com/llvm/llvm-project/commit/35f273ab07d9f1e65a662fb25a1aeebaba4552c2 DIFF: https://github.com/llvm/llvm-project/commit/35f273ab07d9f1e65a662fb25a1aeebaba4552c2.diff L

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/130228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
@@ -5218,16 +5218,28 @@ static bool EvaluateVarDecl(EvalInfo &Info, const VarDecl *VD) { return true; } +static bool EvaluateDecompositionDeclInit(EvalInfo &Info, + const DecompositionDecl *DD); + static bool EvaluateDecl(EvalInfo &

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
@@ -529,8 +529,12 @@ def warn_cxx14_compat_decomp_decl : Warning< def ext_decomp_decl : ExtWarn< "decomposition declarations are a C++17 extension">, InGroup; def ext_decomp_decl_cond : ExtWarn< - "ISO C++17 does not permit structured binding declaration in a condition">, -

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
@@ -4224,15 +4224,18 @@ class DecompositionDecl final : public VarDecl, private llvm::TrailingObjects { /// The number of BindingDecl*s following this object. - unsigned NumBindings; + unsigned NumBindings : 31; + + LLVM_PREFERRED_TYPE(bool) + unsigned IsDecisio

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
@@ -5218,16 +5218,28 @@ static bool EvaluateVarDecl(EvalInfo &Info, const VarDecl *VD) { return true; } +static bool EvaluateDecompositionDeclInit(EvalInfo &Info, + const DecompositionDecl *DD); + static bool EvaluateDecl(EvalInfo &

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
cor3ntin wrote: (Make sure to update the description at some point) https://github.com/llvm/llvm-project/pull/130228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c8ec807 - [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (#128641)

2025-03-10 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-09T23:30:08-07:00 New Revision: c8ec8073aa5d8e87a15d101ded149de399518bc1 URL: https://github.com/llvm/llvm-project/commit/c8ec8073aa5d8e87a15d101ded149de399518bc1 DIFF: https://github.com/llvm/llvm-project/commit/c8ec8073aa5d8e87a15d101ded149de399518bc1.diff

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin commented: I have some questions Can you edit https://clang.llvm.org/docs/LanguageExtensions.html#language-extensions-back-ported-to-previous-standards ? (For people following at home, CWG decided _not_ to provide a feature test macro) https://github.com/llvm/llvm

[clang] [llvm] [Clang][LLVM] Implement multi-multi vectors MOP4{A/S} (PR #129230)

2025-03-10 Thread via cfe-commits
@@ -289,6 +289,114 @@ multiclass ZAFPOuterProd { defm SVMOPA : ZAFPOuterProd<"mopa">; defm SVMOPS : ZAFPOuterProd<"mops">; + +// SME2 - FMOP4A, FMOP4S, BFMOP4A, BFMOP4S + +multiclass MOP4 checks>

[clang] [llvm] [Clang][LLVM] Implement multi-multi vectors MOP4{A/S} (PR #129230)

2025-03-10 Thread via cfe-commits
@@ -289,6 +289,114 @@ multiclass ZAFPOuterProd { defm SVMOPA : ZAFPOuterProd<"mopa">; defm SVMOPS : ZAFPOuterProd<"mops">; + +// SME2 - FMOP4A, FMOP4S, BFMOP4A, BFMOP4S + +multiclass MOP4 checks>

[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-03-10 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra approved this pull request. https://github.com/llvm/llvm-project/pull/128519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

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

[clang] [ARM] mtp = auto using hard point while arch supports thumb2 and hardtp (PR #130027)

2025-03-10 Thread Peter Smith via cfe-commits
@@ -14,18 +14,18 @@ // RUN: FileCheck -check-prefix=ARMv7_THREAD_POINTER-TPIDRPRW %s // ARMv7_THREAD_POINTER-TPIDRPRW: "-target-feature" "+read-tp-tpidrprw" -// RUN: %clang --target=armv6t2-linux -mtp=cp15 -### -S %s 2>&1 | \ -// RUN: FileCheck -check-prefix=ARM_THREAD_POINTER

[clang] [clang][SPIR-V] Use the SPIR-V backend by default (PR #129545)

2025-03-10 Thread Vyacheslav Levytskyy via cfe-commits
VyacheslavLevytskyy wrote: > LGTM, thanks! In what regards the translator use in the HIP Toolchain, from > the AMD side we're looking at transitioning to the BE as soon as possible, > but it will probably be some time until we have fully validated it. I'd gladly hear about priorities (and mayb

[clang] [Clang][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (2/3) (PR #125688)

2025-03-10 Thread David Green via cfe-commits
=?utf-8?q?Csan=C3=A1d_Hajd=C3=BA?= , =?utf-8?q?Csan=C3=A1d_Hajd=C3=BA?= Message-ID: In-Reply-To: https://github.com/davemgreen approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/125688 ___ cfe-commits mailing list cfe-commits

[clang] [Clang][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (2/3) (PR #125688)

2025-03-10 Thread David Green via cfe-commits
=?utf-8?q?Csanád_Hajdú?= , =?utf-8?q?Csanád_Hajdú?= Message-ID: In-Reply-To: https://github.com/davemgreen closed https://github.com/llvm/llvm-project/pull/125688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/130228 >From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 7 Mar 2025 11:38:11 +0800 Subject: [PATCH 1/5] [Clang] Implement P0963R3 "Structured binding declaration as

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-03-10 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/127595 >From 178f52574a732cb19bf75fd958b1f932dcf65908 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/2] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin commented: I much prefer this approach, thanks! https://github.com/llvm/llvm-project/pull/130228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/130228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
@@ -5172,7 +5181,7 @@ template bool Compiler::visitIfStmt(const IfStmt *IS) { return false; if (const DeclStmt *CondDecl = IS->getConditionVariableDeclStmt()) -if (!visitDeclStmt(CondDecl)) +if (!visitDeclStmt(CondDecl, /*EvaluateConditionDecl=*/false)) -

[clang] Forbid co_await and co_yield in invalid expr contexts (PR #130455)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks. Do you need me to merge that for you? https://github.com/llvm/llvm-project/pull/130455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-03-10 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 edited https://github.com/llvm/llvm-project/pull/130623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-03-10 Thread Matt Arsenault via cfe-commits
arsenm wrote: > I don't have recent exposure to the OpenCL implementation, but generally > eyeballed the code to make sure that the changes do what is described. Is > there some confidence that the new scheme actually works? Conformance test passes, which is all that really matters https:

[clang] [llvm] [Clang][llvm] Implement fp8 FMOP4A intrinsics (PR #130127)

2025-03-10 Thread via cfe-commits
@@ -257,7 +266,21 @@ class SME2_Tile_Movaz_Pat(name # _PSEUDO) $tile, $base, $offset)>; +class SME2_ZA_Tile_Vec_Single_Single_Pat +: Pat<(intrinsic imm_ty:$tile, vt:$Zn, vt:$Zm), + (!cast(name # _PSEUDO) $tile, $Zn, $Zm)>; + +class SME2_ZA_Tile_Vec_Multi_Pat ---

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2025-03-10 Thread Zhaoxuan Jiang via cfe-commits
nocchijiang wrote: @AZero13 Do you have any news or plans regarding LTO support? We have several projects with substantial existing Objective-C code, and the performance benefits of LTO support could be significant. I would be interested in taking on a portion or the entirety of this work if i

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Mallikarjuna Gouda (mgoudar) Changes The i6400 and i6500 are high performance multi-core microprocessors from MIPS that provide best in class power efficiency for use in system-on-chip (SoC) applications. i6400 and i6500 implement

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-10 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro edited https://github.com/llvm/llvm-project/pull/130587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM] mtp = auto using hard point while arch supports thumb2 and hardtp (PR #130027)

2025-03-10 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm approved this pull request. Thanks for the extra test. LGTM now. https://github.com/llvm/llvm-project/pull/130027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [Clang] Fix segmentation fault caused by `VarBypassDetector` stack overflow on deeply nested expressions (PR #124128)

2025-03-10 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/124128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread Younan Zhang via cfe-commits
@@ -4224,15 +4224,18 @@ class DecompositionDecl final : public VarDecl, private llvm::TrailingObjects { /// The number of BindingDecl*s following this object. - unsigned NumBindings; + unsigned NumBindings : 31; + + LLVM_PREFERRED_TYPE(bool) + unsigned IsDecisio

[clang] [RISCV][Sema] Add feature check for target attribute to VSETVL intrinsics (PR #126064)

2025-03-10 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/126064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] 3acfef5 - [libunwind][RISCV] Make asm statement volatile (#130286)

2025-03-10 Thread via cfe-commits
Author: Gergely Futo Date: 2025-03-10T10:13:33+01:00 New Revision: 3acfef56b1c5f74edd6ea2111a440677ea2c6763 URL: https://github.com/llvm/llvm-project/commit/3acfef56b1c5f74edd6ea2111a440677ea2c6763 DIFF: https://github.com/llvm/llvm-project/commit/3acfef56b1c5f74edd6ea2111a440677ea2c6763.diff

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread via cfe-commits
@@ -4224,15 +4224,18 @@ class DecompositionDecl final : public VarDecl, private llvm::TrailingObjects { /// The number of BindingDecl*s following this object. - unsigned NumBindings; + unsigned NumBindings : 31; + + LLVM_PREFERRED_TYPE(bool) + unsigned IsDecisio

[clang] [Clang] Fix segmentation fault caused by `VarBypassDetector` stack overflow on deeply nested expressions (PR #124128)

2025-03-10 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-01` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/199/builds/2113 Here is the relevant piece

[clang] Forbid co_await and co_yield in invalid expr contexts (PR #130455)

2025-03-10 Thread via cfe-commits
https://github.com/NewSigma updated https://github.com/llvm/llvm-project/pull/130455 >From 85a40587375533ac8fcd842395c923895c5debaf Mon Sep 17 00:00:00 2001 From: NewSigma Date: Sun, 9 Mar 2025 10:27:24 +0800 Subject: [PATCH 1/3] Fobbid co_await in invalid expr context --- clang/lib/Sema/Sema

[clang] [clang] NNS: don't print trailing scope resolution operator in diagnostics (PR #130529)

2025-03-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/130529 >From 7b6eae71bc2d102c1fa2472b83e16d6fae5640c1 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 7 Mar 2025 10:32:05 -0300 Subject: [PATCH] [clang] NNS: don't print trailing scope resolution operator T

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/130320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove redundant assertion & fix ClearStatName error (PR #130667)

2025-03-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ayush Pareek (ayushpareek2003) Changes Issue: Calling clearStatName() on an error object The function clearStatName() is called inside constructors before checking whether MaybeStat contains an error. If MaybeStat is an error, calling co

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/130320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-10 Thread Farzon Lotfi via cfe-commits
@@ -22,56 +22,136 @@ // // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ // RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \ -// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ -// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTY

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-10 Thread Kaitlin Peng via cfe-commits
@@ -22,56 +22,136 @@ // // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ // RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \ -// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ -// RUN: -DFNATTRS="spir_func noundef nofpclass(nan inf)" -DTY

[clang] c579ec6 - [Clang][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (2/3) (#125688)

2025-03-10 Thread via cfe-commits
Author: Csanád Hajdú Date: 2025-03-10T09:26:53Z New Revision: c579ec66c77461122d93deadebc318fbb846b830 URL: https://github.com/llvm/llvm-project/commit/c579ec66c77461122d93deadebc318fbb846b830 DIFF: https://github.com/llvm/llvm-project/commit/c579ec66c77461122d93deadebc318fbb846b830.diff LOG:

[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-03-10 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/128519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM] mtp = auto using hard point while arch supports thumb2 and hardtp (PR #130027)

2025-03-10 Thread Vladi Krapp via cfe-commits
https://github.com/VladiKrapp-Arm approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/130027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix builtin_memcmp buffer sizes for pointers (PR #130570)

2025-03-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/130570 >From 94cc40f43efa0bb1bf0b361d9b160ca70d43e27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 10 Mar 2025 11:00:54 +0100 Subject: [PATCH] [clang][bytecode] Fix builtin_memcmp buffer siz

[clang-tools-extra] [clang-tidy] Add AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

2025-03-10 Thread Dmitry Nechitaev via cfe-commits
Nechda wrote: Ping https://github.com/llvm/llvm-project/pull/126897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/126846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 773e88f - [Clang] Force expressions with UO_Not to not be non-negative (#126846)

2025-03-10 Thread via cfe-commits
Author: Yutong Zhu Date: 2025-03-10T14:08:50+01:00 New Revision: 773e88f9d61399c566fed45bf7858922f09b8063 URL: https://github.com/llvm/llvm-project/commit/773e88f9d61399c566fed45bf7858922f09b8063 DIFF: https://github.com/llvm/llvm-project/commit/773e88f9d61399c566fed45bf7858922f09b8063.diff LO

[clang] Forbid co_await and co_yield in invalid expr contexts (PR #130455)

2025-03-10 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/130455 >From 85a40587375533ac8fcd842395c923895c5debaf Mon Sep 17 00:00:00 2001 From: NewSigma Date: Sun, 9 Mar 2025 10:27:24 +0800 Subject: [PATCH 1/3] Fobbid co_await in invalid expr context --- clang/lib/Sema/Sema

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread Matheus Izvekov via cfe-commits
@@ -740,13 +740,16 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return nullptr; } - Diag(Decomp.getLSquareLoc(), - !getLangOpts().CPlusPlus17 - ? diag::ext_decomp_decl - : D.getContext() == DeclaratorContext::Condition -

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread Matheus Izvekov via cfe-commits
@@ -5452,6 +5477,11 @@ bool Compiler::visitSwitchStmt(const SwitchStmt *S) { if (!this->emitSetLocal(CondT, CondVar, S)) return false; + if (auto *DD = + dyn_cast_if_present(S->getConditionVariable())) +if (!this->emitDecompositionVarInit(DD)) + retur

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

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

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-10 Thread Matheus Izvekov via cfe-commits
@@ -740,13 +740,16 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D, return nullptr; } - Diag(Decomp.getLSquareLoc(), - !getLangOpts().CPlusPlus17 - ? diag::ext_decomp_decl - : D.getContext() == DeclaratorContext::Condition -

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-10 Thread Farzon Lotfi via cfe-commits
@@ -22,56 +22,136 @@ // // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ // RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \ -// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ +// RUN: -emit-llvm -o - | FileCheck %s \ // RUN: -DFNATTRS

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-10 Thread Arthur Eubanks via cfe-commits
@@ -169,6 +169,17 @@ struct NamedRegionTimer : public TimeRegion { explicit NamedRegionTimer(StringRef Name, StringRef Description, StringRef GroupName, StringRef GroupDescription, bool Enabled = true); + + // Create or

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-10 Thread Arthur Eubanks via cfe-commits
@@ -115,7 +103,9 @@ void PassTimingInfo::init() { /// Prints out timing information and then resets the timers. void PassTimingInfo::print(raw_ostream *OutStream) { - TG.print(OutStream ? *OutStream : *CreateInfoOutputFile(), true); + NamedRegionTimer::getNamedTimerGroup(Tim

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-10 Thread via cfe-commits
mydeveloperday wrote: Imagine if we did this for every "toolkit"... we'd be inundated with add this/that etc... why can't people who use Abseil not add them to their .clang-format? Outside of google are that many people even using Abseil? Abseil itself doesn't even define them in their .clang

[clang] cf6a520 - [clang][bytecode] Fix builtin_memcmp buffer sizes for pointers (#130570)

2025-03-10 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-10T15:51:31+01:00 New Revision: cf6a520a7a48aa82274084f0d4487381f9013fd3 URL: https://github.com/llvm/llvm-project/commit/cf6a520a7a48aa82274084f0d4487381f9013fd3 DIFF: https://github.com/llvm/llvm-project/commit/cf6a520a7a48aa82274084f0d4487381f9013fd3.diff L

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/130320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement the `fmod` intrinsic (PR #130320)

2025-03-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/130320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-03-10 Thread Matheus Izvekov via cfe-commits
@@ -3524,14 +3524,16 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { QualType PointeeType; /// The class of which the pointee is a member. Must ultimately be a - /// RecordType, but could be a typedef or a template parameter too. - const Type *Cl

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-10 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/130648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Use global TimerGroups for both new pass manager and old pass manager timers (PR #130375)

2025-03-10 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/130375 >From b2b4d522a442867aa65655cac1a0ece02616252b Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Mon, 24 Feb 2025 11:10:04 -0800 Subject: [PATCH 1/3] Use global TimerGroups for both new pass manager and old pass

[clang] [Clang] Make `MangleContext::mangleMSGuidDecl()`, `MangleContext::mangleObjCMethodName()` and `MangleContext::mangleObjCMethodNameAsSourceName()` const methods (PR #130613)

2025-03-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Boaz Brickner (bricknerb) Changes Unfortunately, making `MangleContext::mangleName()` would require a lot of const escapes due to lazy initialization and id creations: `Mangle.h`: * https://github.com/llvm/llvm-project/blob/dffbc030e75b7

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-10 Thread Andy Kaylor via cfe-commits
@@ -33,6 +33,14 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("NYI: PPC double-double format for long double"); llvm_unreachable("Unsupported format for long double"); } + + bool isSized(mlir::Type ty) { +if (mlir::isa(ty)) + r

[clang] [clang][bytecode] Fix builtin_memcmp buffer sizes for pointers (PR #130570)

2025-03-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Don't use the pointer size, but the number of elements multiplied by the element size. --- Full diff: https://github.com/llvm/llvm-project/pull/130570.diff 2 Files Affected: - (modified) clang/lib/AST/Byt

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-10 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm edited https://github.com/llvm/llvm-project/pull/130138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-03-10 Thread Matt Arsenault via cfe-commits
@@ -1734,6 +1735,29 @@ define amdgpu_kernel void @unknown_addrspace_kernarg(ptr addrspace(12345) %ptr) ret void } +; Make sure the device_enqueue_symbol is not reported +; CHECK: - .args: [] +; CHECK-NEXT: .group_segment_fixed_size: 0 +; CHECK-NEXT: .kernarg_segme

[clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)

2025-03-10 Thread via cfe-commits
cor3ntin wrote: @mizvekov https://github.com/llvm/llvm-project/pull/126088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-03-10 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -1,23 +1,23 @@ -//===- AMDGPUOpenCLEnqueuedBlockLowering.h ---*- C++-*-===// +//===- AMDGPUExportKernelRuntimeHandles.h ---*- C++-*-===// ssahasra wrote: Do we need the filename and the emacs marking on the first line a

[clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)

2025-03-10 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @nikic thanks for the report, I missed your message, only saw when Corentin pinged. Are you sure that's correct? I had run this patch through llvm-time-tracker before merging, and it had shown practically no impact. Here: https://llvm-compile-time-tracker.com/compare.php?from

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-10 Thread Djordje Todorovic via cfe-commits
@@ -1501,7 +1501,9 @@ bool clang::driver::findMIPSMultilibs(const Driver &D, CPUName == "mips64r5" || CPUName == "octeon" || CPUName == "octeon+", "-march=mips64r2", Flags); - addMultilibFlag(CPUName == "mips64r6",

[clang] [flang] [flang] Add options -W[no-]unused-dummy-argument and -W[no-]unused-variable (PR #127214)

2025-03-10 Thread Jean-Didier PAILLEUX via cfe-commits
JDPailleux wrote: Hi, A PR has been created to support a diagnostic system for Flang here: https://github.com/llvm/llvm-project/pull/130593. I'm open to discuss and apply modifications or rework if necessary. https://github.com/llvm/llvm-project/pull/127214

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-10 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: (please note the update comment above, I did not read the change history and didn't realize the original patch was touching the common default style, not Google's style) https://github.com/llvm/llvm-project/pull/130346 ___ cfe-co

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-10 Thread Erich Keane via cfe-commits
@@ -603,6 +606,64 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter &converter, }); } +// The unreachable code is not lowered by applyPartialConversion function +// since it traverses blocks in the dominance order. At the same time we +// do need to lower such cod

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-10 Thread JJ Marr via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -std=c++23 -verify=expected,cxx20_plus %s + +#ifdef __ASSERT_FUNCTION +#undef __ASSERT_FUNCTION +#endif +extern "C" void __assert_fail(const char*, const char*, unsigned, const char*); + +#define assert(cond) \ + ((cond) ? (void)0 : __assert_f

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-10 Thread Erich Keane via cfe-commits
@@ -0,0 +1,28 @@ +//===--===// +// +// 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: Apac

<    1   2   3   >