[clang] [Clang] prevent errors for deduction guides using deduced type aliases (PR #117450)

2024-11-25 Thread Younan Zhang via cfe-commits
@@ -33,7 +33,7 @@ template typename TT> struct E { // expected-note 2{{template }; A(int) -> int; // expected-error {{deduced type 'int' of deduction guide is not a specialization of template 'A'}} -template A(T)->B; // expected-error {{deduced type 'B' (aka 'A') o

[clang] [Clang] prevent errors for deduction guides using deduced type aliases (PR #117450)

2024-11-25 Thread Younan Zhang via cfe-commits
@@ -11451,7 +11451,11 @@ bool Sema::CheckDeductionGuideDeclarator(Declarator &D, QualType &R, bool MightInstantiateToSpecialization = false; if (auto RetTST = TSI->getTypeLoc().getAsAdjusted()) { - TemplateName SpecifiedName = RetTST.getTypePtr()->getT

[clang] 0fe12a7 - [clang-format][NFC] Remove a pointer in ContinuationIndenter

2024-11-25 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-11-25T00:35:50-08:00 New Revision: 0fe12a7db3f6663c9f2572ff0232e56f1bd411ae URL: https://github.com/llvm/llvm-project/commit/0fe12a7db3f6663c9f2572ff0232e56f1bd411ae DIFF: https://github.com/llvm/llvm-project/commit/0fe12a7db3f6663c9f2572ff0232e56f1bd411ae.diff LOG:

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-11-25 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/113049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-25 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/114072 >From 4b49b221a67bd77db98ca765610f7c1ace0772a0 Mon Sep 17 00:00:00 2001 From: Shashwathi N Date: Tue, 29 Oct 2024 09:16:04 -0500 Subject: [PATCH 1/3] Added support for seq_cst clause for flush directive --

[clang] [Clang] Emit stub version of OpenCL Kernel (PR #115821)

2024-11-25 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 updated https://github.com/llvm/llvm-project/pull/115821 >From 61c90047a2e82e8dd051363f9e56e52e9931c481 Mon Sep 17 00:00:00 2001 From: anikelal Date: Mon, 25 Nov 2024 14:18:36 +0530 Subject: [PATCH] OpenCL allows a kernel function to call another kernel function.

[clang] [Clang-REPL] Fix crash during `__run_exit_handlers` with dynamic libraries. (PR #117475)

2024-11-25 Thread via cfe-commits
SahilPatidar wrote: I have added a test, but it should only run on Darwin (macOS) platforms. ```cpp // REQUIRES: host-supports-jit // RUN: cat %s | env SDKROOT=$(xcrun --show-sdk-path) DYLD_LIBRARY_PATH=%S/Inputs:$DYLD_LIBRARY_PATH clang-repl %lib vec.dylib #include std::vector v; %quit ```

[clang] [clang][AArch64] Avoid a crash when a non-reserved register is used (PR #117419)

2024-11-25 Thread David Spickett via cfe-commits
DavidSpickett wrote: Please check if this fixes https://github.com/llvm/llvm-project/issues/109778 too. Seems very similar. https://github.com/llvm/llvm-project/pull/117419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [Clang] Emit stub version of OpenCL Kernel (PR #115821)

2024-11-25 Thread Aniket Lal via cfe-commits
@@ -127,7 +127,10 @@ static const BlockExpr *getBlockExpr(const Expr *E) { void CGOpenCLRuntime::recordBlockInfo(const BlockExpr *E, llvm::Function *InvokeF, llvm::Value *Block, llvm::Type *BlockTy) {

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-11-25 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > @ilya-biryukov unfortunately it seems that the reproducer is very sensitive > to the exact clang revision. I should have clarified this better. It **does not** reproduce for me either with this example, but it's the exact code (and module structure) that causes the issu

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: Makes sense to me, but do we have tests that make sure codegen for matrixes with power-of-2 bitints is sane? https://github.com/llvm/llvm-project/pull/117487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang-tools-extra] Rename CODE_OWNERS -> Maintainers (PR #114544)

2024-11-25 Thread Julian Schmidt via cfe-commits
5chmidti wrote: @PiotrZSL The ping was in case you want to be added as a maintainer to clang-tidy as well. I’m mentioning it just to make sure. https://github.com/llvm/llvm-project/pull/114544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-11-25 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Attaching an empty RecoveryExpr as an initializer to indicate that initialization was attempted but failed seems reasonable to me. I'll leave the approval to @efriedma-quic. https://github.com/llvm/llvm-project/pull/113049 __

[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)

2024-11-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Helmut Januschka (hjanuschka) Changes Introduced a `SmartPtrName` field in `MakeSmartPtrCheck` to allow matching on other smart pointer types, such as `base::scoped_refptr`, in addition to `std::shared_ptr`. This enables more versati

[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)

2024-11-25 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka converted_to_draft https://github.com/llvm/llvm-project/pull/117529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)

2024-11-25 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka created https://github.com/llvm/llvm-project/pull/117529 Introduced a `SmartPtrName` field in `MakeSmartPtrCheck` to allow matching on other smart pointer types, such as `base::scoped_refptr`, in addition to `std::shared_ptr`. This enables more versatile usage of

[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)

2024-11-25 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-11-25 Thread Haojian Wu via cfe-commits
@@ -115,3 +115,14 @@ namespace nested_union { // of Test3, or we should exclude f(Test3) as a candidate. static_assert(f({1}) == 2, ""); // expected-error {{call to 'f' is ambiguous}} } + +// Fix crash issue https://github.com/llvm/llvm-project/issues/112560. +// Make sure

[clang] [Clang] use begin member expr location for call expr with deducing this (PR #117345)

2024-11-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. LGTM modulo a release note. https://github.com/llvm/llvm-project/pull/117345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)

2024-11-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Helmut Januschka (hjanuschka) Changes Introduced a `SmartPtrName` field in `MakeSmartPtrCheck` to allow matching on other smart pointer types, such as `base::scoped_refptr`, in addition to `std::shared_ptr`. This enables more

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -2312,6 +2312,18 @@ QualType Sema::BuildArrayType(QualType T, ArraySizeModifier ASM, return T; } +bool CheckBitIntElementType(Sema &S, SourceLocation AttrLoc, +const BitIntType *BIT, bool ForMatrixType = false) { + // Only support _BitInt el

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/117487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -2455,6 +2456,10 @@ QualType Sema::BuildMatrixType(QualType ElementTy, Expr *NumRows, Expr *NumCols, return QualType(); } + if (const auto *BIT = ElementTy->getAs(); + BIT && CheckBitIntElementType(*this, AttrLoc, BIT, true)) Fznamznon wrote:

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-25 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: It feels like that the non-power-of-2 _BitInt vectors were disabled because it wasn't known how to handle them. https://reviews.llvm.org/D133634#3793653 It probably is still so, however, does it make sense to document the new behavior? Hopefully also, si

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-11-25 Thread Igor V. Kovalenko via cfe-commits
@@ -1700,6 +1700,7 @@ declToHierarchyItem(const NamedDecl &ND, llvm::StringRef TUPath) { HierarchyItem HI; HI.name = printName(Ctx, ND); + // FIXME: Populate HI.detail the way we do in symbolToHierarchyItem? i-garrison wrote: I see. Ideally there should

[clang] [llvm] [AArch64][SVE] Change the immediate argument in svextq (PR #115340)

2024-11-25 Thread via cfe-commits
SpencerAbson wrote: @aemerson Planning to land this today as long as that is fine with your folk? Thanks https://github.com/llvm/llvm-project/pull/115340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-11-25 Thread Igor V. Kovalenko via cfe-commits
https://github.com/i-garrison edited https://github.com/llvm/llvm-project/pull/77556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-25 Thread via cfe-commits
@@ -102,6 +102,210 @@ void BranchCloneCheck::registerMatchers(MatchFinder *Finder) { this); Finder->addMatcher(switchStmt().bind("switch"), this); Finder->addMatcher(conditionalOperator().bind("condOp"), this); + Finder->addMatcher(ifStmt(hasDescendant(ifStmt())).b

[clang] 48ec59c - [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (#114481)

2024-11-25 Thread via cfe-commits
Author: Alex Voicu Date: 2024-11-25T10:29:50Z New Revision: 48ec59c234ce267a0454b15e9a79a326e21a4a97 URL: https://github.com/llvm/llvm-project/commit/48ec59c234ce267a0454b15e9a79a326e21a4a97 DIFF: https://github.com/llvm/llvm-project/commit/48ec59c234ce267a0454b15e9a79a326e21a4a97.diff LOG: [l

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-25 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 612f8ec - seq_cst is allowed in Flush since OpenMP 5.1. (#114072)

2024-11-25 Thread via cfe-commits
Author: ShashwathiNavada Date: 2024-11-25T16:08:39+05:30 New Revision: 612f8ec7ac5dcddd16fb027aad64e2e353faa528 URL: https://github.com/llvm/llvm-project/commit/612f8ec7ac5dcddd16fb027aad64e2e353faa528 DIFF: https://github.com/llvm/llvm-project/commit/612f8ec7ac5dcddd16fb027aad64e2e353faa528.di

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

2024-11-25 Thread via cfe-commits
github-actions[bot] wrote: @ShashwathiNavada Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with

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

2024-11-25 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale closed https://github.com/llvm/llvm-project/pull/114072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)

2024-11-25 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/117529 >From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Mon, 25 Nov 2024 09:59:21 +0100 Subject: [PATCH 1/2] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec

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

2024-11-25 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,38 @@ +#include +#include +#include + +#define CLC_SIGN(TYPE, F) \ + _CLC_DEF _CLC_OVERLOAD TYPE __clc_sign(TYPE x) { \ +if (__clc_isnan(x)) {

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-11-25 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler approved this pull request. Appears to work fine. Regarding the slight memory increase: If anyone feels strongly about it, they had plenty of time to chime in. https://github.com/llvm/llvm-project/pull/77556 ___ cfe-commit

[clang] [llvm] AMDGPU: Add support for load transpose instructions for gfx950 (PR #117378)

2024-11-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/117378 >From 0faa36e6240f21d77d94e981712f4b57bc4b5d11 Mon Sep 17 00:00:00 2001 From: Sirish Pande Date: Wed, 7 Feb 2024 10:12:03 -0600 Subject: [PATCH] AMDGPU: Add support for load transpose instructions for gfx950 Th

[clang] [llvm] AMDGPU: Add support for load transpose instructions for gfx950 (PR #117378)

2024-11-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-25 Thread via cfe-commits
vabridgers wrote: Hi @HerrCai0907 and @5chmidti , I see that @HerrCai0907 approved the review. Is it ok if I merge the change? Just wanted to make sure I'm not missing any comments specifically from @5chmidti . Thanks! https://github.com/llvm/llvm-project/pull/114715 _

[clang] [clang] hexagon: fix link order for libc/builtins (PR #117057)

2024-11-25 Thread Brian Cain via cfe-commits
https://github.com/androm3da closed https://github.com/llvm/llvm-project/pull/117057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] WIP: [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited https://github.com/llvm/llvm-project/pull/117529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9cc2502 - [clang] hexagon: fix link order for libc/builtins (#117057)

2024-11-25 Thread via cfe-commits
Author: Brian Cain Date: 2024-11-25T11:35:45-06:00 New Revision: 9cc2502c048b1403ba8ba5cc5a655d867c329d12 URL: https://github.com/llvm/llvm-project/commit/9cc2502c048b1403ba8ba5cc5a655d867c329d12 DIFF: https://github.com/llvm/llvm-project/commit/9cc2502c048b1403ba8ba5cc5a655d867c329d12.diff LO

[clang-tools-extra] WIP: [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited https://github.com/llvm/llvm-project/pull/117529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add support for load transpose instructions for gfx950 (PR #117378)

2024-11-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/117378 >From 403db2f7d09c9ff1c358b8eff83407a84c6fc965 Mon Sep 17 00:00:00 2001 From: Sirish Pande Date: Wed, 7 Feb 2024 10:12:03 -0600 Subject: [PATCH] AMDGPU: Add support for load transpose instructions for gfx950 Th

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited https://github.com/llvm/llvm-project/pull/117529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited https://github.com/llvm/llvm-project/pull/117529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka ready_for_review https://github.com/llvm/llvm-project/pull/117529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e97fb22 - AMDGPU: Add support for load transpose instructions for gfx950 (#117378)

2024-11-25 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-11-25T09:39:04-08:00 New Revision: e97fb2207e1ef6235a6268dbbd3cc08d437b07ef URL: https://github.com/llvm/llvm-project/commit/e97fb2207e1ef6235a6268dbbd3cc08d437b07ef DIFF: https://github.com/llvm/llvm-project/commit/e97fb2207e1ef6235a6268dbbd3cc08d437b07ef.diff

[clang] [Clang] Only ignore special methods for unused private fields in BuildFieldReferenceExpr (PR #116965)

2024-11-25 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis updated https://github.com/llvm/llvm-project/pull/116965 From 90febd4a613fc2e76548da6912b32d50bc88a0ac Mon Sep 17 00:00:00 2001 From: Gergely Meszaros Date: Wed, 20 Nov 2024 12:55:59 + Subject: [PATCH 1/2] [Clang] Only ignore special methods for unused private f

[clang] [llvm] AMDGPU: Add support for load transpose instructions for gfx950 (PR #117378)

2024-11-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/117378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add MC support for gfx950 V_BITOP3_B32/B16 (PR #117379)

2024-11-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Sander de Smalen via cfe-commits
@@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { + Normal = 0, + SM_Enabled = 1 << 0, + SM_Compatible = 1 << 1, + ZA_Agnostic = 1 << 2, + ZA_Shift = 3, + ZT0_Shift = 6, sd

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Sander de Smalen via cfe-commits
@@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { + Normal = 0, + SM_Enabled = 1 << 0, + SM_Compatible = 1 << 1, + ZA_Agnostic = 1 << 2, + ZA_Shift = 3, + ZT0_Shift = 6, + None = 0b000, +

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Sander de Smalen via cfe-commits
@@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { + Normal = 0, sdesmalen-arm wrote: nit: I'd remove `Normal` and just keep these values for bits that would be set. https://gi

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Sander de Smalen via cfe-commits
@@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { + Normal = 0, + SM_Enabled = 1 << 0, + SM_Compatible = 1 << 1, + ZA_Agnostic = 1 << 2, + ZA_Shift = 3, + ZT0_Shift = 6, + None = 0b000, +

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Sander de Smalen via cfe-commits
@@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { sdesmalen-arm wrote: Please make this an `enum class` instead. Also, I'd recommend renaming this class so that it's clear that

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Sander de Smalen via cfe-commits
@@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { + Normal = 0, + SM_Enabled = 1 << 0, + SM_Compatible = 1 << 1, + ZA_Agnostic = 1 << 2, + ZA_Shift = 3, + ZT0_Shift = 6, + None = 0b000, +

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Sander de Smalen via cfe-commits
@@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { + Normal = 0, + SM_Enabled = 1 << 0, + SM_Compatible = 1 << 1, + ZA_Agnostic = 1 << 2, + ZA_Shift = 3, + ZT0_Shift = 6, + None = 0b000, +

[clang] [compiler-rt] [libunwind] [llvm] [clang] recognize any *-ld.lld variant (PR #117338)

2024-11-25 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,80 @@ +if (NOT DEFINED LLVM_PATH) MaskRay wrote: I am not sure that these cmake changes should be included in this patch. Many folks concerned with cmake changes will likely notice that this PR has these changes. https://github.com/llvm/llvm-project

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Sander de Smalen via cfe-commits
@@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { + Normal = 0, + SM_Enabled = 1 << 0, + SM_Compatible = 1 << 1, + ZA_Agnostic = 1 << 2, + ZA_Shift = 3, + ZT0_Shift = 6, + None = 0b000, +

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Sander de Smalen via cfe-commits
@@ -3535,6 +3536,74 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +enum SMEState { + Normal = 0, + SM_Enabled = 1 << 0, + SM_Compatible = 1 << 1, + ZA_Agnostic = 1 << 2, + ZA_Shift = 3, + ZT0_Shift = 6, + None = 0b000, +

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/114209 >From ff5b6defc0df704f63fffabc731bcd38a1e24d3b Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 15 Oct 2024 15:22:56 + Subject: [PATCH 1/3] [Clang][AArch64] Include SME attributes in the na

[clang] [flang] [clang][driver] Special care for -l flags in config files (PR #117573)

2024-11-25 Thread Michał Górny via cfe-commits
@@ -0,0 +1 @@ +-ffast-math -lm -lhappy mgorny wrote: Could you also include some "positional" `-Wl` flags, like `-Wl,-Bstatic` and `-Wl,-Bdynamic`? https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mail

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-11-25 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/115971 >From 7413ceb21a6e0ac9212ef6317763ee0eff559612 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 12 Nov 2024 16:44:00 -0800 Subject: [PATCH 1/9] print struct body within target ext ty context --- .../t

[clang] [Clang] Only ignore special methods for unused private fields in BuildFieldReferenceExpr (PR #116965)

2024-11-25 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis updated https://github.com/llvm/llvm-project/pull/116965 From 0dd94643cd32992e4b54463eea8a73d377b9169e Mon Sep 17 00:00:00 2001 From: Gergely Meszaros Date: Wed, 20 Nov 2024 12:55:59 + Subject: [PATCH 1/2] [Clang] Only ignore special methods for unused private f

[clang] [Driver] Support fprofile-sample-use= for CL (PR #117282)

2024-11-25 Thread Fangrui Song via cfe-commits
@@ -8484,6 +8484,9 @@ def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias, A def _SLASH_fsanitize_EQ_address : CLFlag<"fsanitize=address">, HelpText<"Enable AddressSanitizer">, Alias, AliasArgs<["address"]>; +def : CLJoined<"fno-profile-sample-use">, Alias; ---

[clang] [llvm] AMDGPU: MC support for v_cvt_scale_[f16|f32]_bf8 of gfx950. (PR #117381)

2024-11-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-25 Thread Erich Keane via cfe-commits
@@ -1960,24 +1960,44 @@ class ExplicitSpecifier { class CXXDeductionGuideDecl : public FunctionDecl { void anchor() override; +public: + // Represents the relationship between this deduction guide and the + // deduction guide that it was generated from (or lack thereof). +

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

2024-11-25 Thread Erich Keane via cfe-commits
@@ -2246,18 +2246,21 @@ CXXDeductionGuideDecl *CXXDeductionGuideDecl::Create( ASTContext &C, DeclContext *DC, SourceLocation StartLoc, ExplicitSpecifier ES, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, SourceLocation EndLocation, CXXConstr

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

2024-11-25 Thread Erich Keane 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] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I don't think I'm needed on this review again, but did a pass through and had some comments/suggestions. Nothing binding, so I'll let others discuss this/accept this. https://github.com/llvm/llvm-project/pull/98788 _

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

2024-11-25 Thread Erich Keane via cfe-commits
@@ -2010,6 +2032,25 @@ class CXXDeductionGuideDecl : public FunctionDecl { /// this is an implicit deduction guide. CXXConstructorDecl *getCorrespondingConstructor() const { return Ctor; } + /// Get the deduction guide from which this deduction guide was generated, + ///

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

2024-11-25 Thread Erich Keane 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] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-11-25 Thread Erich Keane 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] [llvm] AMDGPU: MC support for v_cvt_scalef32_pk_{fp8|bf8}_f32 of gfx950. (PR #117382)

2024-11-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-25 Thread Erich Keane via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -std=c++20 -verify %s +// expected-no-diagnostics + +template +auto foo(T const& arg) -> T; + +template +auto dispatch(Fp fp, Vis vis) { + return fp(vis); +} + +auto baz(int v) { + auto callable = [](Arg const& arg) -> int { +return foo

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-25 Thread Mathys Gasnier via cfe-commits
@@ -2314,10 +2314,12 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( // Here we expect to see some function declaration. if (AS == AS_none) { assert(TagType == DeclSpec::TST_unspecified); -ParsedAttributes EmptyDeclSpec

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2024-11-25 Thread Peter Smith via cfe-commits
@@ -16,7 +16,7 @@ // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -flto=thin -c -o %t.call_thin.bc -DCALL_LIB // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -flto=thin -c -o %t.define_thin.bc -DDEFINE_LIB -// RUN

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/117167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I am not particularly comfortable/knowledgable in how this all works, but I don't see a problem here. My current concern is that we're going to get the same error 2x for the same failed instantiation, and that seems unfortunate. Also, we need a release

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-25 Thread Erich Keane via cfe-commits
@@ -13523,7 +13525,9 @@ class Sema final : public SemaBase { S.PendingLocalImplicitInstantiations); } -void perform() { S.PerformPendingInstantiations(/*LocalOnly=*/true); } +void perform() { erichkeane wrote: unrelated formatting change

[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

2024-11-25 Thread Erich Keane via cfe-commits
@@ -1,7 +1,12 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// expected-no-diagnostics + template void test1(T __attribute__((noescape)) arr, int size); -// expected-warning@+1 {{'noescape' attribute only applies to pointer arguments}} -void test2(int __attribute__((noes

[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

2024-11-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I see you've enabled it, but the tests don't actually show that this has any effect besides suppressing a diagnostic. I want to see something that shows that the attribute is actually DOING something on non-pointer types. Also, requires a release note.

[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

2024-11-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/117344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-25 Thread Mathys Gasnier via cfe-commits
@@ -480,10 +468,7 @@ Decl *Parser::ParseExportDeclaration() { while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { -ParsedAttributes DeclAttrs(AttrFactory); -MaybeParseCXX11Attributes(DeclAttrs); Mathy

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-25 Thread Erich Keane via cfe-commits
@@ -2314,10 +2314,12 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( // Here we expect to see some function declaration. if (AS == AS_none) { assert(TagType == DeclSpec::TST_unspecified); -ParsedAttributes EmptyDeclSpec

[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)

2024-11-25 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/116843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-11-25 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/115971 >From 7413ceb21a6e0ac9212ef6317763ee0eff559612 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 12 Nov 2024 16:44:00 -0800 Subject: [PATCH 01/10] print struct body within target ext ty context --- ...

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

2024-11-25 Thread Scott Constable via cfe-commits
@@ -208,10 +209,34 @@ void llvm::setKCFIType(Module &M, Function &F, StringRef MangledType) { std::string Type = MangledType.str(); if (M.getModuleFlag("cfi-normalize-integers")) Type += ".normalized"; + + uint32_t OutHash = static_cast(llvm::xxHash64(Type)); + auto

[clang] bb88fd1 - [DirectX] Calculate resource binding offsets using the lower bound (#117303)

2024-11-25 Thread via cfe-commits
Author: Justin Bogner Date: 2024-11-25T10:44:01-08:00 New Revision: bb88fd171a6be892cec36969860a9034b48b8656 URL: https://github.com/llvm/llvm-project/commit/bb88fd171a6be892cec36969860a9034b48b8656 DIFF: https://github.com/llvm/llvm-project/commit/bb88fd171a6be892cec36969860a9034b48b8656.diff

[clang] [llvm] [DirectX] Calculate resource binding offsets using the lower bound (PR #117303)

2024-11-25 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/117303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 01/13] Add EvalASTMutator interface with `InstantiateFunctio

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

2024-11-25 Thread Erich Keane via cfe-commits
@@ -515,26 +515,94 @@ namespace { Call }; + /// Either a FunctionDecl or an ObjCMethodDecl. This struct papers over the + /// fact that their common ancestors are DeclContext and NamedDecl, which + /// does not allow the enumeration of their parameters very easily. +

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-11-25 Thread Raphael Moreira Zinsly via cfe-commits
https://github.com/rzinsly created https://github.com/llvm/llvm-project/pull/117612 Enable `-fstack-clash-protection` for RISCV and stack probe for function prologues. We probe the stack by creating a loop that allocates and probe the stack in ProbeSize chunks. We emit an unrolled probe loop f

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-11-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Raphael Moreira Zinsly (rzinsly) Changes Enable `-fstack-clash-protection` for RISCV and stack probe for function prologues. We probe the stack by creating a loop that allocates and probe the stack in Pro

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-11-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Raphael Moreira Zinsly (rzinsly) Changes Enable `-fstack-clash-protection` for RISCV and stack probe for function prologues. We probe the stack by creating a loop that allocates and probe the stack in ProbeSize chunks. We emit an

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-25 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/117507 >From a6c9b5ca52f35fe451a52c590ce93584c2b4f3ac Mon Sep 17 00:00:00 2001 From: Aidan Goldfarb <47676355+aidangoldf...@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:06:29 -0500 Subject: [PATCH 1/6] Upda

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-11-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Nits only, otherwise LGTM. https://github.com/llvm/llvm-project/pull/101469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-11-25 Thread Erich Keane via cfe-commits
@@ -7197,10 +7206,10 @@ alternatives, though the attribute can be used even when the fix can't be automa and then use the attribute on the original ``baz()`` to help the users update their code to use the new function. -* Attribute attached to fields: The attribute should

  1   2   3   4   5   6   >