[clang] [llvm] [aarch64][llvm] Allow AArch64 TLB maintenance instructions to be enabled via -march (PR #116707)

2024-11-20 Thread David Green via cfe-commits
davemgreen wrote: > These instructions are being used in the hand-written assembly for a > hypervisor. The hypervisor will check at runtime if the instructions are > available on the current CPU before calling this code. We try to coordinate between GCC and LLVM, to make sure we implement the

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -11757,6 +11791,42 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } +// Errors in deduction guides from inherited constructors +// will manifest as substitution failures in the return type +// partial specializ

[clang] [clang] Infer lifetime_capture_by for STL containers (PR #117122)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes This is behind `-Wdangling-capture` warning which is disabled by default. --- Full diff: https://github.com/llvm/llvm-project/pull/117122.diff 5 Files Affected: - (modified) clang/include/clang/Sema/Sema.h

[clang] [clang] Infer lifetime_capture_by for STL containers (PR #117122)

2024-11-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/117122 This is behind `-Wdangling-capture` warning which is disabled by default. >From 9a57223b06a8331a0ef123739a430863dee19d98 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 21 Nov 2024 07:00:56 + Subject

[clang] [X86] Enhance kCFI type IDs with a 3-bit arity indicator. (PR #117121)

2024-11-20 Thread Scott Constable via cfe-commits
https://github.com/scottconstable created https://github.com/llvm/llvm-project/pull/117121 Kernel Control Flow Integrity (kCFI) is a feature that hardens indirect calls by comparing a 32-bit hash of the function pointer's type against a hash of the target function's type. If the hashes do not

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -1173,25 +1276,52 @@ void DeclareImplicitDeductionGuidesForTypeAlias( NewParam->setScopeInfo(0, I); FPTL.setParam(I, NewParam); } - auto *Transformed = cast(buildDeductionGuide( - SemaRef, AliasTemplate, /*TemplateParams=*/nullptr, + +

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -942,34 +946,145 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +struct InheritedConstructorDeductionInfo { + // Class template for which we are declaring deduction guides + // This is `C`

[clang] [Clang] Preserve partially substituted pack indexing type/expressions (PR #116782)

2024-11-20 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. missing changelog entry, otherwise LGTM https://github.com/llvm/llvm-project/pull/116782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -10615,6 +10615,40 @@ bool clang::isBetterOverloadCandidate( auto *Guide1 = dyn_cast_or_null(Cand1.Function); auto *Guide2 = dyn_cast_or_null(Cand2.Function); if (Guide1 && Guide2) { + // -- F1 and F2 are generated from class template argument deduction +

[clang] 476b208 - [clang][bytecode] Fix ToType/FromType diagnostic ordering (#116988)

2024-11-20 Thread via cfe-commits
Author: Timm Baeder Date: 2024-11-21T07:54:38+01:00 New Revision: 476b208e0115e766605e9f850982996a1d51c287 URL: https://github.com/llvm/llvm-project/commit/476b208e0115e766605e9f850982996a1d51c287 DIFF: https://github.com/llvm/llvm-project/commit/476b208e0115e766605e9f850982996a1d51c287.diff L

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -931,12 +935,73 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +struct InheritedConstructorDeductionInfo { + // Class template for which we are declaring deduction guides + // This is `C` i

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -1203,10 +1333,291 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -1203,10 +1333,291 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -931,12 +935,73 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +struct InheritedConstructorDeductionInfo { + // Class template for which we are declaring deduction guides + // This is `C` i

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -11757,6 +11791,42 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } +// Errors in deduction guides from inherited constructors +// will manifest as substitution failures in the return type +// partial specializ

[clang] [clang][bytecode] Fix ToType/FromType diagnostic ordering (PR #116988)

2024-11-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/116988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add implicit resource element type concepts to AST (PR #116413)

2024-11-20 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/116413 >From 92ccbe72ca95ad2df5a81b76244a8a8d7cedef40 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 15 Nov 2024 09:00:15 -0800 Subject: [PATCH 1/6] update new tests --- clang/lib/Sema/HLSLExternalSemaSour

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From e98e6f210f02af0813393d88e1bc4f02c0682e5f Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH 1/9] Add Clang attribute to ensure that fields are

[clang] [flang] [llvm] seq_cst is allowed in Flush since OpenMP 5.1. (PR #114072)

2024-11-20 Thread via cfe-commits
ShashwathiNavada wrote: > > > Thanks for this patch. Could you update the title/summary of the patch to > > > say that seq_cst is allowed in Flush since OpenMP 5.1. Also, might make > > > sense to say why no other changes in Lowering to IR is required. > > > Could you add a test in flang/test/L

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Dan Gohman via cfe-commits
sunfishcode wrote: > I see, so in practice the effect on LLVM is that you get a relocation at each > call_indirect site but we don't need this relocation of the wide encoding for > any particular reason. LLVM is already emitting those relocations in the default "generic" CPU today. If that's

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-20 Thread via cfe-commits
@@ -936,19 +940,21 @@ Expr *buildIsDeducibleConstraint(Sema &SemaRef, Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate)); }; + TemplateDecl *TD = DeducingTemplate ? DeducingTemplate : AliasTemplate; + SmallVector IsDeducibleTypeTraitArgs = {

[clang] [lld] [llvm] [RISCV] Make A implies Zaamo and Zalrsc (PR #116907)

2024-11-20 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 036cd27da250de7fab37d25ea5836b52ae2e7783 bf51e7704ccdda72743080e9b36650e37ea10f47 --e

[clang] [lld] [llvm] [RISCV] Make A implies Zaamo and Zalrsc (PR #116907)

2024-11-20 Thread Jim Lin via cfe-commits
https://github.com/tclin914 updated https://github.com/llvm/llvm-project/pull/116907 >From 08523139b789c836b22677f8e16b79910de601e4 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Wed, 20 Nov 2024 10:31:58 +0800 Subject: [PATCH 1/3] [RISCV] Make A implies Zaamo and Zalrsc Ref: https://github.com/

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From e98e6f210f02af0813393d88e1bc4f02c0682e5f Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH 1/9] Add Clang attribute to ensure that fields are

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From e98e6f210f02af0813393d88e1bc4f02c0682e5f Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH 1/9] Add Clang attribute to ensure that fields are

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From e98e6f210f02af0813393d88e1bc4f02c0682e5f Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH 1/9] Add Clang attribute to ensure that fields are

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Sam Clegg via cfe-commits
sbc100 wrote: > I guessed that since the "generic" CPU is already out there forcing various > binary decoders to support this feature, it wouldn't be controversial for > "lime1" to do it too. I do think its reasonable for all those decoders to support overlong LEBs. But I think I don't see

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
@@ -2302,6 +2302,10 @@ def err_init_list_bad_dest_type : Error< def warn_cxx20_compat_aggregate_init_with_ctors : Warning< "aggregate initialization of type %0 with user-declared constructors " "is incompatible with C++20">, DefaultIgnore, InGroup; +def warn_cxx20_compat_re

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-11-20 Thread Yaxun Liu via cfe-commits
@@ -6405,7 +6424,12 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, TC = std::make_unique(*this, Target, Args); break; case llvm::Triple::AMDHSA: - TC = std::make_unique(*this, Target, Args); + TC = + llvm::any_of(Inputs, +

[clang] [Serialization] Downgrade inconsistent flags from erros to warnings (PR #115416)

2024-11-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'd like to land this in next week if no objection comes in. https://github.com/llvm/llvm-project/pull/115416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-11-20 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'd like to land this in the next week if no objection comes in. https://github.com/llvm/llvm-project/pull/114382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TargetVersion] Only enable on RISC-V and AArch64 (PR #115991)

2024-11-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while building `clang` at step 12 "build-stage2-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/5755 He

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From e98e6f210f02af0813393d88e1bc4f02c0682e5f Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH 1/9] Add Clang attribute to ensure that fields are

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From e98e6f210f02af0813393d88e1bc4f02c0682e5f Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH 1/8] Add Clang attribute to ensure that fields are

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-20 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > @yxsamliu -- should I add it for HIP, too? Yes please. I would appreciate that. Thanks. https://github.com/llvm/llvm-project/pull/117074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] c4be13c - Revert "[TargetVersion] Only enable on RISC-V and AArch64" (#117110)

2024-11-20 Thread via cfe-commits
Author: Piyou Chen Date: 2024-11-21T12:48:50+08:00 New Revision: c4be13cb9c81469060e2018f4e4673440772db03 URL: https://github.com/llvm/llvm-project/commit/c4be13cb9c81469060e2018f4e4673440772db03 DIFF: https://github.com/llvm/llvm-project/commit/c4be13cb9c81469060e2018f4e4673440772db03.diff LO

[clang] Revert "[TargetVersion] Only enable on RISC-V and AArch64" (PR #117110)

2024-11-20 Thread Piyou Chen via cfe-commits
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/117110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[TargetVersion] Only enable on RISC-V and AArch64" (PR #117110)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Piyou Chen (BeMg) Changes Reverts llvm/llvm-project#115991 Due to build fail https://lab.llvm.org/buildbot/#/builders/66/builds/6511 --- Full diff: https://github.com/llvm/llvm-project/pull/117110.diff 3 Files Affected: - (modified) cl

[clang] Revert "[TargetVersion] Only enable on RISC-V and AArch64" (PR #117110)

2024-11-20 Thread Piyou Chen via cfe-commits
https://github.com/BeMg created https://github.com/llvm/llvm-project/pull/117110 Reverts llvm/llvm-project#115991 Due to build fail https://lab.llvm.org/buildbot/#/builders/66/builds/6511 >From e7efa82cb1362e8a2eae63fa66954327de50b88a Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Thu, 21 Nov

[clang] 922282e - [TargetVersion] Only enable on RISC-V and AArch64 (#115991)

2024-11-20 Thread via cfe-commits
Author: Piyou Chen Date: 2024-11-21T12:26:30+08:00 New Revision: 922282eacfc054ddadbec04825d6573179e66200 URL: https://github.com/llvm/llvm-project/commit/922282eacfc054ddadbec04825d6573179e66200 DIFF: https://github.com/llvm/llvm-project/commit/922282eacfc054ddadbec04825d6573179e66200.diff LO

[clang] [TargetVersion] Only enable on RISC-V and AArch64 (PR #115991)

2024-11-20 Thread Piyou Chen via cfe-commits
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/115991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move several integer functions to CLC library (PR #116786)

2024-11-20 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,21 @@ +#ifndef __CLC_INTEGER_CLC_CLZ_H__ +#define __CLC_INTEGER_CLC_CLZ_H__ + +#if defined(CLC_CLSPV) || defined(CLC_SPIRV) +// clspv and spir-v targets provide their own OpenCL-compatible clz +#define __clc_clz clz arsenm wrote: I don't really underst

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-20 Thread Matt Arsenault via cfe-commits
@@ -322,22 +322,26 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 ) set( build_flags -O0 -finline-hint-functions -DCLC_SPIRV ) - set( opt_flags ) + set( clc_opt_flags ) + # Inline CLC functions into OpenCL

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-20 Thread via cfe-commits
goldsteinn wrote: > > I don't disagree these are all potential pitfalls (and there are certainly > > more), I just don't see how having the diff code in a separate project > > ameliorates any of them. And as stated earlier, I think it in fact > > complicates them. > > The issue of "complexity

[clang] [llvm] [LoongArch] Support LA V1.1 feature ld-seq-sa that don't generate dbar 0x700. (PR #116762)

2024-11-20 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. LGTM. But we can also add this feature in `sys::getHostCPUFeatures` in this PR. https://github.com/llvm/llvm-project/pull/116762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [ObjC] Enable diagnose_if on Objective-C methods (PR #115056)

2024-11-20 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: > I wish I didn't need to change the ExprConstant call stack machinery like > this, happy to take suggestions. This is all because the closest ancestors of > FunctionDecl and ObjCMethodDecl are NamedDecl and DeclGroup. Should we enable `diagnose_if` for block methods too? ```

[clang] [llvm] Add the initializes attribute inference (PR #117104)

2024-11-20 Thread Haopeng Liu via cfe-commits
https://github.com/haopliu closed https://github.com/llvm/llvm-project/pull/117104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [NFC] Merge conditions (PR #116612)

2024-11-20 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. https://github.com/llvm/llvm-project/pull/116612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] ignore consteval function in `ExceptionAnalyzer` (PR #116643)

2024-11-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/116643 >From 529e5af068588e18e061aa399a28cd146816fc80 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 18 Nov 2024 23:50:22 +0800 Subject: [PATCH 1/2] [clang-tidy] ignore consteval function in `ExceptionAnal

[clang] [llvm] Add the initializes attribute inference (PR #117104)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis Author: Haopeng Liu (haopliu) Changes reland https://github.com/llvm/llvm-project/pull/97373 after fixing clang tests. Confirmed with "ninja check-llvm" and "ninja check-clang" --- Patch is 128.57 KiB, truncated to 20.00 KiB below, full

[clang] [llvm] Add the initializes attribute inference (PR #117104)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Haopeng Liu (haopliu) Changes reland https://github.com/llvm/llvm-project/pull/97373 after fixing clang tests. Confirmed with "ninja check-llvm" and "ninja check-clang" --- Patch is 128.57 KiB, truncated to 20.00 KiB below, full

[clang] [llvm] Add the initializes attribute inference (PR #117104)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-transforms Author: Haopeng Liu (haopliu) Changes reland https://github.com/llvm/llvm-project/pull/97373 after fixing clang tests. Confirmed with "ninja check-llvm" and "ninja check-clang" --- Patch is 128.57 KiB, trunca

[clang] [HLSL] Implement SV_GroupID semantic (PR #115911)

2024-11-20 Thread Zhengxing li via cfe-commits
https://github.com/lizhengxing updated https://github.com/llvm/llvm-project/pull/115911 >From 6418461717614d5879688d32a0ab9bf9d9137328 Mon Sep 17 00:00:00 2001 From: Zhengxing Li Date: Tue, 1 Oct 2024 15:13:34 -0700 Subject: [PATCH 1/3] [HLSL] Implement SV_GroupID semantic Support SV_GroupID a

[clang] [ASTWriter] Do not allocate source location space for module maps used only for textual headers (PR #116374)

2024-11-20 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Does preprocessing from AST files (ab75597ddac52f24e9cbd794cded195262ef670e) with decluse checking (f3f846162a5d6b5b84ed7d146a29dc175542c2c0) still work with this patch? I'm surprised that removing of module maps just because they only provided a textual header doesn't have

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/117087 >From 48808d43f41b61a419790fd25f99b5e897e5a419 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/3] [WebAssembly] Define call-indirect-overlong and bulk-memor

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

2024-11-20 Thread Younan Zhang via cfe-commits
@@ -3705,6 +3713,12 @@ bool Parser::ParseExpressionList(SmallVectorImpl &Exprs, Token Comma = Tok; ConsumeToken(); checkPotentialAngleBracketDelimiter(Comma); + +if (Tok.is(tok::r_paren)) { + if (HasTrailingComma) +*HasTrailingComma = true; +

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode edited https://github.com/llvm/llvm-project/pull/112035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/117087 >From 48808d43f41b61a419790fd25f99b5e897e5a419 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/2] [WebAssembly] Define call-indirect-overlong and bulk-memor

[clang] [llvm] [HLSL] Add implicit resource element type concepts to AST (PR #116413)

2024-11-20 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/116413 >From 92ccbe72ca95ad2df5a81b76244a8a8d7cedef40 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 15 Nov 2024 09:00:15 -0800 Subject: [PATCH 1/5] update new tests --- clang/lib/Sema/HLSLExternalSemaSour

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

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

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-11-20 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: Behold, I've added a bunch of pedantic comments about the tests. I think a significant matter is that they all run an LLVM optimisation pipeline, which I believe means they cover too much of the project to be "clang" tests, they're more end-to-end or cross

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-11-20 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 %s -triple=%itanium_abi_triple -O1 -emit-llvm -fextend-lifetimes -o - | FileCheck %s +// Make sure we don't crash compiling a lambda that is not nested in a function. +// We also check that fake uses are properly issued in lambdas. + +int glo

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-20 Thread Younan Zhang via cfe-commits
@@ -185,3 +185,46 @@ template struct S { friend void X::f(T::type); }; } + +namespace GH113324 { +template struct S1 { + friend void f1(S1, int = 0); // expected-error {{friend declaration specifying a default argument must be a definition}} + friend void f2(S1 a, S1 = de

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. LGTM modulo 1 nit. @mizvekov are you happy with it? https://github.com/llvm/llvm-project/pull/115487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

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

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

2024-11-20 Thread Trevor Gross via cfe-commits
@@ -255,4 +255,9 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) { } setLibcallName(RTLIB::MULO_I128, nullptr); } + + if (TT.isSystemZ()) { +setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2"); +setLibcallName(RTLIB::FPEXT_F16_F32, "__extendhfs

[clang] [llvm] [HLSL] Add implicit resource element type concepts to AST (PR #116413)

2024-11-20 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/116413 >From 92ccbe72ca95ad2df5a81b76244a8a8d7cedef40 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 15 Nov 2024 09:00:15 -0800 Subject: [PATCH 1/4] update new tests --- clang/lib/Sema/HLSLExternalSemaSour

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
MatzeB wrote: Note that this has the test changes from #117091 included. https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (PR #117090)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Only call getThisType() on an instance method. --- Full diff: https://github.com/llvm/llvm-project/pull/117090.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCap

[clang] [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (PR #117090)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Only call getThisType() on an instance method. --- Full diff: https://github.com/llvm/llvm-project/pull/117090.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-20 Thread via cfe-commits
@@ -53,3 +53,6 @@ LLVM_FIXED_MD_KIND(MD_DIAssignID, "DIAssignID", 38) LLVM_FIXED_MD_KIND(MD_coro_outside_frame, "coro.outside.frame", 39) LLVM_FIXED_MD_KIND(MD_mmra, "mmra", 40) LLVM_FIXED_MD_KIND(MD_noalias_addrspace, "noalias.addrspace", 41) +// TODO: this will likelly be pla

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-20 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B created https://github.com/llvm/llvm-project/pull/117074 We do not have support for the threadsafe statics on the GPU side. However, we do sometimes end up with empty local static initializers, and those happen to trigger calls to `__cxa_guard*`, which breaks compila

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use a Worklist for some CodeGenFunctions (PR #115395)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: In general, it's hard to avoid recursion: an AST is fundamentally a tree, and the most natural way to walk a tree is recursive, which is why we have issues in the first place. This usually isn't an issue because people don't write deeply nested code

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116331 >From 3c792216f88e87b69b3ea7415c2fd74b7f5d7469 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Fri, 25 Oct 2024 17:48:41 + Subject: [PATCH 1/9] adding comments --- clang/include/clang/Basic/Attr.td

[clang] [clang] constexpr built-in reduce `or` and `xor` function. (PR #116976)

2024-11-20 Thread via cfe-commits
@@ -732,6 +732,10 @@ at the end to the next power of 2. These reductions support both fixed-sized and scalable vector types. +The reduction intrinsics, including ``__builtin_reduce_add``, c8ef wrote: Added. https://github.com/llvm/llvm-project/pull/116976 _

[clang] [clang] constexpr built-in reduce `or` and `xor` function. (PR #116976)

2024-11-20 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/116976 >From 4d13a8267dd5d0e99063bb088a85406af5266c80 Mon Sep 17 00:00:00 2001 From: c8ef Date: Wed, 20 Nov 2024 22:07:35 +0800 Subject: [PATCH 1/2] constexpr reduce or/xor --- clang/docs/ReleaseNotes.rst

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matthias Braun (MatzeB) Changes It would be useful for us to have `__attribue__((target("prefer-256-bit")))` / `__attribue__((target("no-prefer-256-bit")))` to create variants of a functions to generate AVX code with 256/512 bit vector si

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Sam Clegg via cfe-commits
sbc100 wrote: > The short answer is that's what the [Lime1 CPU calls > it](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#lime1) > 😄 . > > > Can you explain why you want call-indirect-overlong in lime1? Is it because > > you want to be able to link files compiles with multi

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matthias Braun (MatzeB) Changes Rework the attr-target-x86 test so the CHECK lines for the attributes are next to their corresponding `__attribute__`. --- Full diff: https://github.com/llvm/llvm-project/pull/117091.diff 1 Files Affected

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116331 >From 3c792216f88e87b69b3ea7415c2fd74b7f5d7469 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Fri, 25 Oct 2024 17:48:41 + Subject: [PATCH 1/8] adding comments --- clang/include/clang/Basic/Attr.td

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/117091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/117091 Rework the attr-target-x86 test so the CHECK lines for the attributes are next to their corresponding `__attribute__`. >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/117092 - Rework attr-target-x86 test - Allow prefer-256-bit for __attribute__((target)) >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 20 Nov 2024 17:23:56 -080

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Dan Gohman via cfe-commits
sunfishcode wrote: The short answer is that's what the [Lime1 CPU calls it](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#lime1) :smile: . > Can you explain why you want call-indirect-overlong in lime1? Is it because > you want to be able to link files compiles with multi-

[clang] [clang] Use a Worklist for some CodeGenFunctions (PR #115395)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/115395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use a Worklist for some CodeGenFunctions (PR #115395)

2024-11-20 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: split-file %s %t +// RUN: python %t/gen.py %t/switch-overflow.c %t/tmp.c && %clang_cc1 -emit-llvm %t/tmp.c -o - | FileCheck %t/tmp.c + +//--- gen.py efriedma-quic wrote: I guess 32000 is small enough that a test won't be that expensive,

[clang] [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (PR #117090)

2024-11-20 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/117090 Only call getThisType() on an instance method. >From 31481cda425206408eb3aeef844503b110dfaa4d Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 20 Nov 2024 17:23:18 -0800 Subject: [PATCH] [webkit.UncountedLa

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Sam Clegg via cfe-commits
sbc100 wrote: Can you explain why you want `call-indirect-overlong` in lime1? Is it because you want to be able to link files compiles with multi-table? i.e. do you want/expect type relocations at every call_indirect site? If so then perhaps a better name might be `call-indirect-relocatabl

[clang] [llvm] [HLSL] Add implicit resource element type concepts to AST (PR #116413)

2024-11-20 Thread Chris B via cfe-commits
@@ -472,10 +569,91 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, .addDefaultHandleConstructor(S); } +Expr *constructTypedBufferConstraintExpr(Sema &S, SourceLocation NameLoc, + TemplateTypeParmDecl

[clang-tools-extra] [clang-tidy] New option `CompilationArgsToRemoveRegex` to remove arguments from the command line (PR #111453)

2024-11-20 Thread Nicolas van Kempen via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: nicovank wrote: Just for discussion: 1. Almost equivalent to `sed -i -E 's/-f[[:alnum:][:punct:]]*//g; s/-Werror//g' compile_commands.json`? 2. What if a `-f...` argument is needed while others should be ignored? The regex might

[clang] [llvm] [HLSL] Add implicit resource element type concepts to AST (PR #116413)

2024-11-20 Thread Chris B via cfe-commits
llvm-beanz wrote: Looks like you added a file that has some odd characters and maybe a diff? https://github.com/llvm/llvm-project/pull/116413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-20 Thread Ashley Coleman via cfe-commits
@@ -2848,7 +2819,7 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, case Intrinsic::spv_wave_active_countbits: return selectWaveActiveCountBits(ResVReg, ResType, I); case Intrinsic::spv_wave_any: -return selectWaveActiveAnyTrue(ResVReg, ResType,

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-11-20 Thread via cfe-commits
@@ -20029,6 +20029,52 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) { Alignment); } +TEST_F(FormatTest, AlignConsecutiveDeclarationsBlockComments) { + FormatStyle Style = getLLVMStyleWithColumns(80); + Style.AlignConsecutiveDeclarations.Enabled = true; +

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode edited https://github.com/llvm/llvm-project/pull/112035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread Dan Gohman via cfe-commits
@@ -854,9 +854,15 @@ and `-mbulk-memory` flags, which correspond to the [Bulk Memory Operations] and [Non-trapping float-to-int Conversions] language features, which are [widely implemented in engines]. +A new Lime1 target CPU is added, -mcpu=lime1. This CPU follows the defin

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
@@ -2148,6 +2161,35 @@ void CXXRecordDecl::completeDefinition(CXXFinalOverriderMap *FinalOverriders) { for (conversion_iterator I = conversion_begin(), E = conversion_end(); I != E; ++I) I.setAccess((*I)->getAccess()); + + ASTContext &Context = getASTContext(); +

  1   2   3   4   5   6   >