[clang] [Clang] Don't assert on substituted-but-yet-expanded packs for nested lambdas (PR #112896)

2024-10-21 Thread via cfe-commits
@@ -8385,14 +8385,19 @@ TreeTransform::TransformDeclStmt(DeclStmt *S) { if (Transformed != D) DeclChanged = true; -if (LSI && isa(Transformed)) - LSI->ContainsUnexpandedParameterPack |= - getSema() - .getASTContext() - .get

[clang] [Clang] Don't assert on substituted-but-yet-expanded packs for nested lambdas (PR #112896)

2024-10-21 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/112896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Smrnmi extension (PR #111668)

2024-10-21 Thread Sam Elliott via cfe-commits
@@ -813,6 +815,12 @@ def MRET : Priv<"mret", 0b0011000>, Sched<[]> { let rs1 = 0; let rs2 = 0b00010; } + +def MNRET : Priv<"mnret", 0b0111000>, Sched<[]> { lenary wrote: Nice, thanks! https://github.com/llvm/llvm-project/pull/111668 __

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-10-21 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Thanks! LGTM https://github.com/llvm/llvm-project/pull/110063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix range calculation for conditionals with throw expressions (PR #112081)

2024-10-21 Thread Oleksandr T. via cfe-commits
@@ -9827,6 +9827,9 @@ static IntRange GetExprRange(ASTContext &C, const Expr *E, unsigned MaxWidth, return IntRange(BitField->getBitWidthValue(C), BitField->getType()->isUnsignedIntegerOrEnumerationType()); + if (GetExprType(E)->isVoidType()) +ret

[clang] [Clang] fix range calculation for conditionals with throw expressions (PR #112081)

2024-10-21 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/112081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Smrnmi extension (PR #111668)

2024-10-21 Thread Sam Elliott via cfe-commits
@@ -129,6 +129,7 @@ on support follow. ``Smcdeleg`` Supported ``Smcsrind`` Supported ``Smepmp``Supported + ``Smrnmi``Supported lenary wrote: This should probably be "Assembly Support" - some of the other `*ret` ins

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

2024-10-21 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: @ilya-biryukov could you please take a look? https://github.com/llvm/llvm-project/pull/111992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-10-21 Thread via cfe-commits
@@ -1109,12 +1109,50 @@ bool Sema::EnsureTemplateArgumentListConstraints( return false; } -bool Sema::CheckInstantiatedFunctionTemplateConstraints( +static bool CheckFunctionConstraintsWithoutInstantiation( +Sema &SemaRef, SourceLocation PointOfInstantiation, +Functi

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-10-21 Thread via cfe-commits
@@ -1109,12 +1109,50 @@ bool Sema::EnsureTemplateArgumentListConstraints( return false; } -bool Sema::CheckInstantiatedFunctionTemplateConstraints( +static bool CheckFunctionConstraintsWithoutInstantiation( +Sema &SemaRef, SourceLocation PointOfInstantiation, +Functi

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-10-21 Thread via cfe-commits
@@ -522,6 +522,9 @@ enum class TemplateSubstitutionKind : char { llvm::PointerUnion * findInstantiationOf(const Decl *D); +llvm::PointerUnion * +findInstantiationUnsafe(const Decl *D); cor3ntin wrote: Can you add a comment explaining what this

[clang] [clang] Lifetimebound in assignment operator should work for non-gsl annotated types. (PR #113180)

2024-10-21 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/113180 This issue is identified during the discussion of [this comment](https://github.com/llvm/llvm-project/issues/112234#issuecomment-2426102198). There will be no release note for this fix as it is a follow-up to [P

[clang] [Serialization] Handle uninitialized type constraints (PR #110496)

2024-10-21 Thread Florian Albrechtskirchinger via cfe-commits
falbrechtskirchinger wrote: > Bump, it would be nice to have this or that fix backported to 19.x @vient Backport is happening. #113182 https://github.com/llvm/llvm-project/pull/110496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/113189 Restricts hlsl countbits to always return a uint32. Implements a lowering from llvm.ctpop which has an overloaded return type to dxil cbits op which always returns uint32. Closes #112779 >From f110f3167769d91dd8

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Sarah Spall (spall) Changes Restricts hlsl countbits to always return a uint32. Implements a lowering from llvm.ctpop which has an overloaded return type to dxil cbits op which always returns uint32. Closes #112779 --- Full diff: https://

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx Author: Sarah Spall (spall) Changes Restricts hlsl countbits to always return a uint32. Implements a lowering from llvm.ctpop which has an overloaded return type to dxil cbits op which always returns uint32. Closes #112779 --- Full dif

[clang] f1e455e - [NFC][Sema][OpenMP] Fix free-nonheap-object warning (#112942)

2024-10-21 Thread via cfe-commits
Author: Jinsong Ji Date: 2024-10-21T12:21:50-04:00 New Revision: f1e455ed51be4f53462db87aa5d64dbd830e5de2 URL: https://github.com/llvm/llvm-project/commit/f1e455ed51be4f53462db87aa5d64dbd830e5de2 DIFF: https://github.com/llvm/llvm-project/commit/f1e455ed51be4f53462db87aa5d64dbd830e5de2.diff LO

[clang] [NFC][Sema][OpenMP] Fix free-nonheap-object warning (PR #112942)

2024-10-21 Thread Jinsong Ji via cfe-commits
https://github.com/jsji closed https://github.com/llvm/llvm-project/pull/112942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 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 d9c95efb6c102fc9e9c52a558d611bb7aa433dbb f110f3167769d91dd87b260b30c2a61cc754b619 --e

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-10-21 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/107581 ___ 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-10-21 Thread via cfe-commits
@@ -11758,6 +11795,40 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } +// Errors in deduction guides from inherited constructors +// will present as substitution failures in the mapping +// partial specialization

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

2024-10-21 Thread via cfe-commits
@@ -1398,5 +1807,30 @@ void Sema::DeclareImplicitDeductionGuides(TemplateDecl *Template, ->getTemplatedDecl()) ->setDeductionCandidateKind(DeductionCandidate::Copy); + CXXRecordDecl *TemplatedDecl = Pattern->getTemplatedDecl(); + if (getLangOpts().CPlusPlus2

[clang] [clang-tools-extra] [clang][dataflow] Cache accessors for bugprone-unchecked-optional-access (PR #112605)

2024-10-21 Thread Yitzhak Mandelbaum via cfe-commits
@@ -523,6 +544,99 @@ void transferCallReturningOptional(const CallExpr *E, setHasValue(*Loc, State.Env.makeAtomicBoolValue(), State.Env); } +void handleConstMemberCall(const CallExpr *CE, + dataflow::RecordStorageLocation *RecordLoc, +

[clang] [clang-tools-extra] [clang][dataflow] Cache accessors for bugprone-unchecked-optional-access (PR #112605)

2024-10-21 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/112605 ___ 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-10-21 Thread via cfe-commits
https://github.com/cor3ntin commented: I think that this looks generally good A few comments - can you give a description if what needs to be done in subsequent PRs? (maybe cxx_status.html should say "partial" - can you add a release notes - can you add PCH or module tests for the changes t

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

2024-10-21 Thread via cfe-commits
@@ -11758,6 +11795,40 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } +// Errors in deduction guides from inherited constructors +// will present as substitution failures in the mapping +// partial specialization

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

2024-10-21 Thread via cfe-commits
https://github.com/cor3ntin 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-10-21 Thread via cfe-commits
@@ -1107,8 +1172,32 @@ BuildDeductionGuideForTypeAlias(Sema &SemaRef, Sema::CodeSynthesisContext::BuildingDeductionGuides)) { auto *GG = cast(FPrime); -Expr *IsDeducible = buildIsDeducibleConstraint( -SemaRef, AliasTemplate, FPrime->getReturnType(), F

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

2024-10-21 Thread via cfe-commits
@@ -899,7 +902,8 @@ Expr *buildIsDeducibleConstraint(Sema &SemaRef, return TypeTraitExpr::Create( Context, Context.getLogicalOperationType(), AliasTemplate->getLocation(), TypeTrait::BTT_IsDeducible, IsDeducibleTypeTraitArgs, - AliasTemplate->getLocation(), /

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

2024-10-21 Thread via cfe-commits
@@ -10616,6 +10616,43 @@ 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] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-10-21 Thread via cfe-commits
@@ -58,7 +58,7 @@ inline InheritableAttr *getDLLAttr(Decl *D) { } /// Retrieve the depth and index of a template parameter. -inline std::pair getDepthAndIndex(NamedDecl *ND) { +inline std::pair getDepthAndIndex(const NamedDecl *ND) { cor3ntin wrote: This coul

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

2024-10-21 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-10-21 Thread via cfe-commits
@@ -11758,6 +11795,40 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } +// Errors in deduction guides from inherited constructors +// will present as substitution failures in the mapping cor3ntin wrot

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

2024-10-21 Thread via cfe-commits
@@ -1960,24 +1960,38 @@ class ExplicitSpecifier { class CXXDeductionGuideDecl : public FunctionDecl { void anchor() override; +public: + enum class SourceKind { cor3ntin wrote: Can we get a better name / comment for this enum? https://github.com/llvm/llvm

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

2024-10-21 Thread via cfe-commits
@@ -10616,6 +10616,43 @@ 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] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-21 Thread Ronan Keryell via cfe-commits
https://github.com/keryell approved this pull request. LGTM. Thanks for the good documentation! https://github.com/llvm/llvm-project/pull/111389 ___ 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-10-21 Thread via cfe-commits
@@ -11723,6 +11764,40 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } +// Errors in deduction guides from inherited constructors +// will present as substitution failures in the mapping +// partial specialization

[clang] [clang] use ArrayTypeTraitExpr::getType as value type (PR #113186)

2024-10-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/113186 Fixed: #113044 >From 938de3d98db4b8e784cb7ec12b940e686ba1f304 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 21 Oct 2024 23:49:04 +0800 Subject: [PATCH] [clang] use ArrayTypeTraitExpr::getType as v

[clang] [clang] use ArrayTypeTraitExpr::getType as value type (PR #113186)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Congcong Cai (HerrCai0907) Changes Fixed: #113044 --- Full diff: https://github.com/llvm/llvm-project/pull/113186.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/lib/CodeGen/CGExprScalar.cpp (+1

[clang] [clang] use ArrayTypeTraitExpr::getType as value type (PR #113186)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Congcong Cai (HerrCai0907) Changes Fixed: #113044 --- Full diff: https://github.com/llvm/llvm-project/pull/113186.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/lib/CodeGen/CGExprScalar

[clang] [clang] use ArrayTypeTraitExpr::getType as value type (PR #113186)

2024-10-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/113186 >From 938de3d98db4b8e784cb7ec12b940e686ba1f304 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 21 Oct 2024 23:49:04 +0800 Subject: [PATCH] [clang] use ArrayTypeTraitExpr::getType as value type Fixed:

[clang] [clang] use ArrayTypeTraitExpr::getType as value type (PR #113186)

2024-10-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/113186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [lld] [llvm] [Coverage][WebAssembly] Add initial support for WebAssembly/WASI (PR #111332)

2024-10-21 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Hi. this change caused chromium windows pgo build to fail: https://g-issues.chromium.org/issues/373478548 and we see the profile runtime error message: ``` LLVM Profile Error: Invalid profile data to merge LLVM Profile Error: Profile Merging of file default_16487515506031793746

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2024-10-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: We should also add new builtins (with the minnum/maxnum names) to get the stronger 2019 behavior https://github.com/llvm/llvm-project/pull/113133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2024-10-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple x86_64 %s -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK + +float fminf (float, float); +double fmin (double, double); +long double fminl (long double, long double); +float fmaxf (float, float); +double fmax (double, double);

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2024-10-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple x86_64 %s -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK + +float fminf (float, float); +double fmin (double, double); +long double fminl (long double, long double); +float fmaxf (float, float); +double fmax (double, double);

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2024-10-21 Thread Matt Arsenault via cfe-commits
@@ -2858,10 +2862,13 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_fminf: case Builtin::BI__builtin_fminf16: case Builtin::BI__builtin_fminl: -case Builtin::BI__builtin_fminf128: - return RVal

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2024-10-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple x86_64 %s -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK + +float fminf (float, float); +double fmin (double, double); +long double fminl (long double, long double); +float fmaxf (float, float); +double fmax (double, double);

[clang] [clang][bytecode] Allow ArrayElemPtr ops on null pointers (PR #113132)

2024-10-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/113132 None >From 8a60b9fc2990708eb8ac34d2f7d53ed8f6fcda6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 21 Oct 2024 08:59:44 +0200 Subject: [PATCH] [clang][bytecode] Allow ArrayElemPtr ops

[clang] [clang][bytecode] Allow ArrayElemPtr ops on null pointers (PR #113132)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/113132.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (+7-5) - (modified) clang/test/AST/ByteCode/complex.cpp (+1-2) `

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2024-10-21 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa created https://github.com/llvm/llvm-project/pull/113133 See: https://github.com/llvm/llvm-project/pull/112852 We will define llvm.minnum and llvm.maxnum with +0.0>-0.0, by default, while libc doesn't require it. >From ec7d885a7bc89fcb35c08890fde2f07da1e61984 Mon Se

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: YunQiang Su (wzssyqa) Changes See: https://github.com/llvm/llvm-project/pull/112852 We will define llvm.minnum and llvm.maxnum with +0.0>-0.0, by default, while libc doesn't require it. --- Full diff: https://github.com/llvm/llvm

[clang] [llvm] Clang: emit llvm.minnum and llvm.maxnum with nsz always (PR #113133)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: YunQiang Su (wzssyqa) Changes See: https://github.com/llvm/llvm-project/pull/112852 We will define llvm.minnum and llvm.maxnum with +0.0>-0.0, by default, while libc doesn't require it. --- Full diff: https://github.com/llvm/llvm-project

[clang] [llvm] APFloat: Fix maxnum and minnum with sNaN (PR #112854)

2024-10-21 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/112854 >From 30da4359c2b36d6fef88108b68800833dd514a22 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Fri, 18 Oct 2024 16:33:19 +0800 Subject: [PATCH] APFloat: Fix maxnum and minnum with sNaN See: https://github.com/

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

2024-10-21 Thread via cfe-commits
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

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

2024-10-21 Thread via cfe-commits
https://github.com/antangelo 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][bytecode] Allow ArrayElemPtr ops on null pointers (PR #113132)

2024-10-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/113132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Allow ArrayElemPtr ops on null pointers (PR #113132)

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

[clang] 923b8ee - [clang][bytecode] Allow ArrayElemPtr ops on null pointers (#113132)

2024-10-21 Thread via cfe-commits
Author: Timm Baeder Date: 2024-10-21T09:52:07+02:00 New Revision: 923b8eea644a4d1fed0f3e20677514cf3f4e0fcc URL: https://github.com/llvm/llvm-project/commit/923b8eea644a4d1fed0f3e20677514cf3f4e0fcc DIFF: https://github.com/llvm/llvm-project/commit/923b8eea644a4d1fed0f3e20677514cf3f4e0fcc.diff L

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

2024-10-21 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/109497 ___ 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-10-21 Thread via cfe-commits
@@ -634,7 +634,7 @@ struct ConvertConstructorToDeductionGuideTransform { // Find all template parameters that appear in the given DeducedArgs. // Return the indices of the template parameters in the TemplateParams. -SmallVector TemplateParamsReferencedInTemplateArgumentList( +

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

2024-10-21 Thread via cfe-commits
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

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

2024-10-21 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/109497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-21 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a updated https://github.com/llvm/llvm-project/pull/112849 >From acbab11de650830ff94905cabb90f6a680552052 Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Fri, 18 Oct 2024 03:35:13 -0400 Subject: [PATCH 1/2] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros

[clang] c77e836 - [RISCV][FMV] Remove support for negative priority (#112161)

2024-10-21 Thread via cfe-commits
Author: Piyou Chen Date: 2024-10-21T16:10:22+08:00 New Revision: c77e836123d056d98051ee980003593706f9284d URL: https://github.com/llvm/llvm-project/commit/c77e836123d056d98051ee980003593706f9284d DIFF: https://github.com/llvm/llvm-project/commit/c77e836123d056d98051ee980003593706f9284d.diff LO

[clang] [RISCV][FMV] Remove support for negative priority (PR #112161)

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

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-21 Thread Fabian Ritter via cfe-commits
@@ -26,8 +27,14 @@ class MacroBuilder { MacroBuilder(raw_ostream &Output) : Out(Output) {} /// Append a \#define line for macro of the form "\#define Name Value\n". - void defineMacro(const Twine &Name, const Twine &Value = "1") { + /// If DeprecationMsg is provided, als

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Sarah Spall via cfe-commits
@@ -705,66 +705,74 @@ float4 cosh(float4); #ifdef __HLSL_ENABLE_16_BIT _HLSL_AVAILABILITY(shadermodel, 6.2) -_HLSL_BUILTIN_ALIAS(__builtin_elementwise_popcount) -int16_t countbits(int16_t); spall wrote: When I asked Justin about this he pointed to this link:

[clang] [HLSL][NFC] Move IsIntangibleType from SemaHLSL to Type to make it accessible outside of Sema (PR #113206)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes Moves `IsIntangibleType` from SemaHLSL to Type class and renames it to `isHLSLIntangibleType`. The existing `isHLSLIntangibleType` is renamed to `isHLSLBuiltinIntangibleType` and updated to return true only fo

[clang] [HLSL][NFC] Move IsIntangibleType from SemaHLSL to Type to make it accessible outside of Sema (PR #113206)

2024-10-21 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/113206 Moves `IsIntangibleType` from SemaHLSL to Type class and renames it to `isHLSLIntangibleType`. The existing `isHLSLIntangibleType` is renamed to `isHLSLBuiltinIntangibleType` and updated to return true only for

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-21 Thread Alexey Bader via cfe-commits
https://github.com/bader edited https://github.com/llvm/llvm-project/pull/111389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 622e398 - [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (#112447)

2024-10-21 Thread via cfe-commits
Author: Stanislav Mekhanoshin Date: 2024-10-21T11:57:18-07:00 New Revision: 622e398d8828431e082a336814d29932e22c8450 URL: https://github.com/llvm/llvm-project/commit/622e398d8828431e082a336814d29932e22c8450 DIFF: https://github.com/llvm/llvm-project/commit/622e398d8828431e082a336814d29932e22c84

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-21 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/112447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
@@ -705,66 +705,74 @@ float4 cosh(float4); #ifdef __HLSL_ENABLE_16_BIT _HLSL_AVAILABILITY(shadermodel, 6.2) -_HLSL_BUILTIN_ALIAS(__builtin_elementwise_popcount) -int16_t countbits(int16_t); bfavela wrote: Ah, of course our documentation is wrong. countbits of

[clang-tools-extra] [clang-tidy] Fix for cppcoreguidelines-pro-type-union-access if memLoc is invalid (PR #104540)

2024-10-21 Thread Konstantin Romanov via cfe-commits
@@ -141,6 +141,10 @@ New check aliases Changes in existing checks ^^ +- Fixed :doc:`cppcoreguidelines-pro-type-union-access + ` check to + report a location even when the member location is not valid. ksromanov wrote: Done. https://

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-21 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/113212 As shufflevector is effectively commutative we should apply the same logic as other commutative operations where we order the inputs by their `getComplexity()` value. This will put things like `undef`, `poison` an

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Matthias Braun (MatzeB) Changes As shufflevector is effectively commutative we should apply the same logic as other commutative operations where we order the inputs by their `getComplexity()` value. This will put things like `unde

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-21 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/112424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SanitizerCoverage] Add gated tracing callbacks support to trace-cmp (PR #113227)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: None (thetruestblue) Changes The option -sanitizer-coverage-gated-trace-callbacks gates the invocation of the trace-pc-guard callbacks based on the value of a global variable, which is stored in a specific section. In this commi

[clang] [llvm] [SanitizerCoverage] Add gated tracing callbacks support to trace-cmp (PR #113227)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (thetruestblue) Changes The option -sanitizer-coverage-gated-trace-callbacks gates the invocation of the trace-pc-guard callbacks based on the value of a global variable, which is stored in a specific section. In this commit, we exte

[clang] [-Wunsafe-buffer-usage] Fix false negatives of missing 2-param span ctors in constructor initializers (PR #113226)

2024-10-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Ziqing Luo (ziqingluo-90) Changes The analysis now searches for every descendant stmt of constructor initializers and recurses if the descendant is another constructor call. (rdar://137999201) --- Full diff: https://github.com/l

[clang] [-Wunsafe-buffer-usage] Fix false negatives of missing 2-param span ctors in constructor initializers (PR #113226)

2024-10-21 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/113226 The analysis now searches for every descendant stmt of constructor initializers and recurses if the descendant is another constructor call. (rdar://137999201) >From e27fccf11bb750e32453be923f6925abd4cfda3

[clang] [-Wunsafe-buffer-usage] Fix false negatives of missing 2-param span ctors in constructor initializers (PR #113226)

2024-10-21 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 40ea92c859234d536553cf26650e89d6e52071c6 e27fccf11bb750e32453be923f6925abd4cfda31 --e

[clang] [llvm] [SanitizerCoverage] Add gated tracing callbacks support to trace-cmp (PR #113227)

2024-10-21 Thread via cfe-commits
https://github.com/thetruestblue created https://github.com/llvm/llvm-project/pull/113227 The option -sanitizer-coverage-gated-trace-callbacks gates the invocation of the trace-pc-guard callbacks based on the value of a global variable, which is stored in a specific section. In this commit, we

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-21 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SanitizerCoverage] Add gated tracing callbacks support to trace-cmp (PR #113227)

2024-10-21 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [-Wunsafe-buffer-usage] Fix false negatives of missing 2-param span ctors in constructor initializers (PR #113226)

2024-10-21 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/113226 >From e27fccf11bb750e32453be923f6925abd4cfda31 Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Mon, 21 Oct 2024 14:12:12 -0700 Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Fix false negatives of missing 2-

[clang] [llvm] Rocm instal detect windows work (PR #113225)

2024-10-21 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 845dee36ba4161df153ba05009cea615e20eda5a 01fa7e4ea72b96735d85ed0511d44ca4df106e41 --e

[clang] [-Wunsafe-buffer-usage] Fix false negatives of missing 2-param span ctors in constructor initializers (PR #113226)

2024-10-21 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Worth to mention that there could be "false positives" introduced to those std::span calls in C'tor initializers because the safe-pattern matching is syntactic only, which doesn't know there can be "call stacks" involved in those recursive cases. https://github.com/llvm/l

[clang] [llvm] [SanitizerCoverage] Add gated tracing callbacks support to trace-cmp (PR #113227)

2024-10-21 Thread via cfe-commits
https://github.com/thetruestblue updated https://github.com/llvm/llvm-project/pull/113227 >From dd972e68de679332dc7c6061592a02452f2fbd06 Mon Sep 17 00:00:00 2001 From: thetruestblue <92476612+thetruestb...@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:06:02 -0700 Subject: [PATCH] [Sanitize

[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-10-21 Thread Reid Kleckner via cfe-commits
rnk wrote: I would stick with `fms-compatibility` being the setting here rather than plumbing the driver mode through. Over the years, many build systems have been adapted to work with `clang[++]` and `cl` without going through clang-cl. https://github.com/llvm/llvm-project/pull/105738 ___

[clang] [lld] [llvm] [mlir] [IR] Introduce `U` to `DataLayout` to represent undesirable address space if a target has it (PR #108786)

2024-10-21 Thread Matt Arsenault via cfe-commits
arsenm wrote: > So your solution here is to simply "infect" every language with full address > space awareness? It's similar to, but a simpler version of the ABI emission problem. The frontend has to know properties of the target to emit the IR for it. It's infeasible to encode all of the po

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-21 Thread Florian Mayer via cfe-commits
@@ -764,11 +764,18 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { const DataLayout &DL = GV->getDataLayout(); uint64_t Size = DL.getTypeAllocSize(GV->getValueType()); + if (GV->isTagged()) +Size = alignTo(Size, 16); // If the alignment is spe

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-21 Thread via cfe-commits
@@ -764,11 +764,18 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { const DataLayout &DL = GV->getDataLayout(); uint64_t Size = DL.getTypeAllocSize(GV->getValueType()); + if (GV->isTagged()) +Size = alignTo(Size, 16); pcc wrote: Wo

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-21 Thread via cfe-commits
@@ -764,11 +764,18 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { const DataLayout &DL = GV->getDataLayout(); uint64_t Size = DL.getTypeAllocSize(GV->getValueType()); + if (GV->isTagged()) +Size = alignTo(Size, 16); // If the alignment is spe

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-21 Thread Florian Mayer via cfe-commits
@@ -764,11 +764,18 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { const DataLayout &DL = GV->getDataLayout(); uint64_t Size = DL.getTypeAllocSize(GV->getValueType()); + if (GV->isTagged()) +Size = alignTo(Size, 16); fmayer wrote:

[clang] 6201bcc - [OpenCL] Add cl_ext_image_unorm_int_2_101010_EXT extension (#113145)

2024-10-21 Thread via cfe-commits
Author: Sven van Haastregt Date: 2024-10-21T23:55:19+01:00 New Revision: 6201bcc3b5ed8c2dab39b8365cee09018eee8110 URL: https://github.com/llvm/llvm-project/commit/6201bcc3b5ed8c2dab39b8365cee09018eee8110 DIFF: https://github.com/llvm/llvm-project/commit/6201bcc3b5ed8c2dab39b8365cee09018eee8110.

[clang] [OpenCL] Add cl_ext_image_unorm_int_2_101010_EXT extension (PR #113145)

2024-10-21 Thread Kévin Petit via cfe-commits
https://github.com/kpet closed https://github.com/llvm/llvm-project/pull/113145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenCL] Add cl_ext_image_unorm_int_2_101010_EXT extension (PR #113145)

2024-10-21 Thread Kévin Petit via cfe-commits
kpet wrote: AFAICT, the new tests ran and the failed tests are completely unrelated to this change. Merging. https://github.com/llvm/llvm-project/pull/113145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] Support BasedOnStyle referencing an arbitrary file (PR #110634)

2024-10-21 Thread Ryan Saunders via cfe-commits
jediry wrote: Ping @mydeveloperday @owenca https://github.com/llvm/llvm-project/pull/110634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >