[clang] Pack relocations for Android API > 28 (PR #117624)

2024-12-02 Thread via cfe-commits
@@ -256,6 +256,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) ExtraOpts.push_back("-z"); ExtraOpts.push_back("max-page-size=16384"); } +if (Triple.isAndroidVersionLT(29)) { hiraditya wrote: Edited the

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

2024-12-02 Thread Justin Bogner via cfe-commits
bogner wrote: The title and description are out of date since we changed the approach here - please update them. https://github.com/llvm/llvm-project/pull/115971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-12-02 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > So I take it we decided not to enable it by default in `-fms-compatibility` > mode then? I don't believe it is appropriate to do so. The intent of this warning is to indicate MSVC compatibility issues when building in non-ms-compatibility modes. The existing padding warnings a

[clang] Pack relocations for Android API > 28 (PR #117624)

2024-12-02 Thread via cfe-commits
https://github.com/hiraditya edited https://github.com/llvm/llvm-project/pull/117624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Thank you very much for working so quickly on this! LGTM. https://github.com/llvm/llvm-project/pull/118165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] Pack relocations for Android API > 28 (PR #117624)

2024-12-02 Thread via cfe-commits
@@ -256,6 +256,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) ExtraOpts.push_back("-z"); ExtraOpts.push_back("max-page-size=16384"); } +if (Triple.isAndroidVersionLT(29)) { enh-google wrote: i meant "A

[clang] [llvm] IR: Add an intrinsic for memcmp. (PR #118178)

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

[clang] [llvm] IR: Add an intrinsic for memcmp. (PR #118178)

2024-12-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: > We will want to add more handling than that in the future but it is not > going to be soon. Very likely the additional handling will be for special > cases where the `size_t num` parameter to `memcmp` is known at compile time. > I wanted to add the intrinsic so that the bac

[clang] Pack relocations for Android API >= 28 (PR #117624)

2024-12-02 Thread via cfe-commits
https://github.com/hiraditya edited https://github.com/llvm/llvm-project/pull/117624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add no-rosegment by default for API 29 and earlier. (PR #117611)

2024-12-02 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 5f881b7139bba1b8cd5c09ea021c78b92d1e72c9 e8dd4171b8a1518c13b4779c4cdea04b87bd238e --e

[clang] Add no-rosegment by default for API 29 and earlier. (PR #117611)

2024-12-02 Thread via cfe-commits
https://github.com/hiraditya updated https://github.com/llvm/llvm-project/pull/117611 >From 572d513550a846cbbfd12623cf67491a646d266f Mon Sep 17 00:00:00 2001 From: AdityaK Date: Mon, 25 Nov 2024 11:05:53 -0800 Subject: [PATCH 1/2] Add no-rosegment by default for API < 29. Details in: https://g

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/118074 >From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Fri, 29 Nov 2024 10:17:49 +0100 Subject: [PATCH 01/15] [clang-tidy] Add modernize-use-span-first-last check

[clang] Add configuration option PenaltyBreakBeforeMemberAccess (PR #118409)

2024-12-02 Thread Gedare Bloom via cfe-commits
https://github.com/gedare created https://github.com/llvm/llvm-project/pull/118409 The penalty for breaking before a member access is hard-coded to 150. Add a configuration option to allow setting it. >From dfa4d88b072e99c1c425b85003090a46ca4ec252 Mon Sep 17 00:00:00 2001 From: Gedare Bloom D

[clang] Add no-rosegment by default for API 29 and earlier. (PR #117611)

2024-12-02 Thread via cfe-commits
https://github.com/hiraditya updated https://github.com/llvm/llvm-project/pull/117611 >From 572d513550a846cbbfd12623cf67491a646d266f Mon Sep 17 00:00:00 2001 From: AdityaK Date: Mon, 25 Nov 2024 11:05:53 -0800 Subject: [PATCH 1/2] Add no-rosegment by default for API < 29. Details in: https://g

[clang] Add configuration option PenaltyBreakBeforeMemberAccess (PR #118409)

2024-12-02 Thread Gedare Bloom via cfe-commits
https://github.com/gedare edited https://github.com/llvm/llvm-project/pull/118409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add configuration option PenaltyBreakBeforeMemberAccess (PR #118409)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Gedare Bloom (gedare) Changes The penalty for breaking before a member access is hard-coded to 150. Add a configuration option to allow setting it. --- Full diff: https://github.com/llvm/llvm-project/pull/118409.diff 7 Files Affe

[clang] Add configuration option PenaltyBreakBeforeMemberAccess (PR #118409)

2024-12-02 Thread Gedare Bloom via cfe-commits
@@ -4280,7 +4280,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line, // aaa // .a.(); return !Right.NextOperator || !Right.NextOperator->Previous->closesScope() - ? 150 + ? Style.Pena

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-02 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Seems like `MemIndex::IdxContents` has the same issue. It's a bit suspicious to me that the other `DexIndex` and `MemIndex` constructors are not passing in a `IndexContents` value. Either there's a bug lurking there, or the field is only relevant in certain situations (e.

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-12-02 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,180 @@ + +// RUN: %clang_cc1 -fsyntax-only -Wms-bitfield-compatibility -verify -triple armv8 -std=c++23 %s +// RUN: %clang_cc1 -fsyntax-only -DMS_BITFIELDS -mms-bitfields -verify=msbitfields -triple armv8-apple-macos10.15 -std=c++23 %s + +// msbitfields-no-diagnostics

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-12-02 Thread Reid Kleckner via cfe-commits
@@ -631,6 +631,9 @@ Improvements to Clang's diagnostics - Clang now diagnoses dangling references for C++20's parenthesized aggregate initialization (#101957). +- A new off-by-default warning ``-Wms-bitfield-compatibility`` has been added to alert to cases where bit-field -

[clang] Pack relocations for Android API >= 28 (PR #117624)

2024-12-02 Thread via cfe-commits
https://github.com/hiraditya updated https://github.com/llvm/llvm-project/pull/117624 >From 90e21e8b20a66fad23ac703f5ac121e608829446 Mon Sep 17 00:00:00 2001 From: AdityaK Date: Mon, 25 Nov 2024 11:05:53 -0800 Subject: [PATCH 1/2] Add no-rosegment by default for API < 29. Details in: https://g

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/118074 >From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Fri, 29 Nov 2024 10:17:49 +0100 Subject: [PATCH 01/18] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka commented: MANY thanks, yet again, feedback addressed. https://github.com/llvm/llvm-project/pull/118074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2024-12-02 Thread Reid Kleckner via cfe-commits
@@ -6418,6 +6418,12 @@ def warn_signed_bitfield_enum_conversion : Warning< InGroup, DefaultIgnore; def note_change_bitfield_sign : Note< "consider making the bitfield type %select{unsigned|signed}0">; +def warn_ms_bitfield_mismatched_storage_packing : Warning< + "bit-field

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via cfe-commits
hjanuschka wrote: 🙈 https://github.com/llvm/llvm-project/pull/118074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread via cfe-commits
@@ -58,6 +58,7 @@ add_clang_library(clangTidyReadabilityModule STATIC UppercaseLiteralSuffixCheck.cpp UseAnyOfAllOfCheck.cpp UseStdMinMaxCheck.cpp + UseSpanFirstLastCheck.cpp EugeneZelenko wrote: I think one-line change is fine in this pull request. ht

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-02 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/117673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-12-02 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/111883 >From b7d329a60d6de140df9d7a2484e7a998c3a7b532 Mon Sep 17 00:00:00 2001 From: Adam Yang Date: Thu, 10 Oct 2024 10:20:37 -0700 Subject: [PATCH 1/8] Added the intrinsic to clang --- clang/include/clang/Basic/B

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-02 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,151 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/118074 >From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Fri, 29 Nov 2024 10:17:49 +0100 Subject: [PATCH 01/19] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/118074 >From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Fri, 29 Nov 2024 10:17:49 +0100 Subject: [PATCH 01/20] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-span-first-last + +readability-use-span-first-last +=== + +Checks for uses of ``std::span::subspan()`` that can be replaced with clearer EugeneZelenko wrote: Please synchronize

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-span-first-last + +readability-use-span-first-last +=== + +Checks for uses of ``std::span::subspan()`` that can be replaced with clearer +``first()`` or ``last()`` member functions. These dedicat

[clang] [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (PR #117845)

2024-12-02 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -std=c++20 -fms-compatibility -fms-compatibility-version=19.33 -emit-llvm %s -o - -triple=x86_64-windows-msvc | FileCheck %s + +template +concept C = requires +{ +{ T::test([](){}) }; +}; + +template +struct Widget {}; + +template +stru

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

2024-12-02 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,128 @@ +// RUN: %clang_cc1 -vectorize-loops -vectorize-slp -O3 -triple x86_64 %s -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK +// RUN: %clang_cc1 -vectorize-loops -vectorize-slp -O3 -ffp-exception-behavior=strict -DENSTRICT=1 -triple x86_64 %s -emit-llvm -

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

2024-12-02 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,128 @@ +// RUN: %clang_cc1 -vectorize-loops -vectorize-slp -O3 -triple x86_64 %s -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK +// RUN: %clang_cc1 -vectorize-loops -vectorize-slp -O3 -ffp-exception-behavior=strict -DENSTRICT=1 -triple x86_64 %s -emit-llvm -

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

2024-12-02 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,128 @@ +// RUN: %clang_cc1 -vectorize-loops -vectorize-slp -O3 -triple x86_64 %s -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK +// RUN: %clang_cc1 -vectorize-loops -vectorize-slp -O3 -ffp-exception-behavior=strict -DENSTRICT=1 -triple x86_64 %s -emit-llvm -

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

2024-12-02 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,128 @@ +// RUN: %clang_cc1 -vectorize-loops -vectorize-slp -O3 -triple x86_64 %s -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK +// RUN: %clang_cc1 -vectorize-loops -vectorize-slp -O3 -ffp-exception-behavior=strict -DENSTRICT=1 -triple x86_64 %s -emit-llvm -

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

2024-12-02 Thread John McCall via cfe-commits
@@ -5692,7 +5692,10 @@ CGCallee CodeGenFunction::EmitCallee(const Expr *E) { // Resolve direct calls. } else if (auto DRE = dyn_cast(E)) { if (auto FD = dyn_cast(DRE->getDecl())) { - return EmitDirectCallee(*this, FD); + auto CalleeDecl = FD->hasAttr() +

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

2024-12-02 Thread John McCall via cfe-commits
https://github.com/rjmccall requested changes to this pull request. https://github.com/llvm/llvm-project/pull/115821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-02 Thread John McCall via cfe-commits
@@ -2343,6 +2343,15 @@ void CodeGenModule::ConstructAttributeList(StringRef Name, // Collect function IR attributes from the CC lowering. // We'll collect the paramete and result attributes later. CallingConv = FI.getEffectiveCallingConvention(); + GlobalDecl GD = Calle

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

2024-12-02 Thread John McCall via cfe-commits
@@ -1085,8 +1085,10 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { blockAddr.getPointer(), ConvertType(blockInfo.getBlockExpr()->getType())); if (IsOpenCL) { -CGM.getOpenCLRuntime().recordBlockInfo(blockInfo.BlockExpression, Inv

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

2024-12-02 Thread John McCall via cfe-commits
@@ -1780,6 +1786,15 @@ void CXXNameMangler::mangleDeviceStubName(const IdentifierInfo *II) { << II->getName(); } +void CXXNameMangler::mangleOCLDeviceStubName(const IdentifierInfo *II) { + // ::= __clang_ocl_kern_imp_ + // ::= [n] + // ::= + StringRef OCLDevi

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

2024-12-02 Thread John McCall via cfe-commits
@@ -71,14 +71,19 @@ class GlobalDecl { GlobalDecl(const FunctionDecl *D, unsigned MVIndex = 0) : MultiVersionIndex(MVIndex) { if (!D->hasAttr()) { + if (D->hasAttr()) { +Value.setPointerAndInt(D, unsigned(KernelReferenceKind::Kernel)); +return;

[clang] 979a035 - [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (#116888)

2024-12-02 Thread via cfe-commits
Author: Veera Date: 2024-12-02T09:33:45+01:00 New Revision: 979a0356d4c90ec855be4f2d2f6687132cf10298 URL: https://github.com/llvm/llvm-project/commit/979a0356d4c90ec855be4f2d2f6687132cf10298 DIFF: https://github.com/llvm/llvm-project/commit/979a0356d4c90ec855be4f2d2f6687132cf10298.diff LOG: [I

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/116888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-12-02 Thread via cfe-commits
github-actions[bot] wrote: @veera-sivarajan 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] [flang] Treat pre-processed input as fixed (PR #117563)

2024-12-02 Thread via cfe-commits
https://github.com/macurtis-amd updated https://github.com/llvm/llvm-project/pull/117563 >From 4cbb372546335d067340d907756c1a62704218c9 Mon Sep 17 00:00:00 2001 From: Matthew Curtis Date: Mon, 2 Dec 2024 07:16:28 -0600 Subject: [PATCH] [flang] Treat pre-processed input as fixed --- clang/lib/

[clang] [AArch64][SME] Fix bug on SMELd1St1 (PR #118109)

2024-12-02 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: It would be good to land this and get this cherry-picked onto the release/19.x branch. Any objection in merging this @wwwatermiao? https://github.com/llvm/llvm-project/pull/118109 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-02 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/115051 ___ 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-12-02 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode closed https://github.com/llvm/llvm-project/pull/117087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-12-02 Thread Mikołaj Piróg via cfe-commits
@@ -1206,6 +1245,19 @@ void Writer::createMiscChunks() { IMAGE_DLL_CHARACTERISTICS_EX_CET_COMPAT)); } + if (writeLTO) { +debugRecords.emplace_back(COFF::IMAGE_DEBUG_TYPE_POGO, + make(ltcg));

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Amr Hesham via cfe-commits
@@ -10264,6 +10264,11 @@ def warn_depr_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup; +def warn_array_comparison : Warning< + "comparison between two arrays; " AmrDeveloper wrote: I am thi

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-02 Thread Shafik Yaghmour via cfe-commits
@@ -10264,6 +10264,11 @@ def warn_depr_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup; +def warn_array_comparison : Warning< + "comparison between two arrays; " shafik wrote: Maybe "Compari

[libclc] [libcxx] [llvm] [openmp] [polly] [llvm] Move sub-project lead maintainers into their own Maintainers.md files (PR #118309)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: David Spickett (DavidSpickett) Changes This adds Maintainers.md files to the sub-projects mentioned here, so that someone going directly to that sub-project will find them more easily. Recently I needed to find a libclc maintainer and I

[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-12-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Actually cppcodingguideline require `gsl` support, which mean the most of fixture in this check is still wrong. I see lots of people in project just use explicit cast instead of implicit cast to avoid this check. But it is totally wrong and mean nothing. Because in c++ stand

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-02 Thread Jan Voung via cfe-commits
jvoung wrote: Hi @5chmidti and @HerrCai0907 any thoughts on the "Would it help if this was instead a checker option?"? Given the volume of false positives right now, I think skip by default, but can turn on if needed. I updated the description to include the point of "we are currently seeing m

[clang] [llvm] Revert "[SPIR-V] Fixup storage class for global private (#116636)" (PR #118312)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Nathan Gauër (Keenuts) Changes This reverts commit aa7fe1c10e5d6d0d3aacdb345fed995de413e142. --- Full diff: https://github.com/llvm/llvm-project/pull/118312.diff 20 Files Affected: - (modified) clang/include/clang/Basic/Addres

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-12-02 Thread Kito Cheng via cfe-commits
@@ -32,3 +36,39 @@ vint32m1_t test_no_vector_cc_attr(vint32m1_t input, int32_t *base, size_t vl) { __riscv_vse32_v_i32m1(base, val, vl); return ret; } + +// CHECK-LLVM: define dso_local void @test_vls_no_cc(i128 noundef %arg.coerce) +// CHECK-LLVM-ABI-VLEN: define dso_loca

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

2024-12-02 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: > The missing bit was `-O1`, as soon as I've added that, I am now getting the > error with this commit and not getting any error without this commit. Here is > a proper reproducer: > [friends.tgz](https://github.com/user-attachments/files/17950471/friends.tgz) Thank you for

[clang] [Driver][OpenMP] Fix OpenMP target-toolchain-option parser (PR #115375)

2024-12-02 Thread Jefferson Le Quellec via cfe-commits
https://github.com/jle-quel updated https://github.com/llvm/llvm-project/pull/115375 >From b85cc64cee1ac22f27c648ca8d892b40804f6d98 Mon Sep 17 00:00:00 2001 From: Jefferson Le Quellec Date: Thu, 7 Nov 2024 22:38:26 +0100 Subject: [PATCH 1/2] Fix OpenMP target-toolchain-option parser --- clang

[clang] ac7fe42 - [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (#117717)

2024-12-02 Thread via cfe-commits
Author: SpencerAbson Date: 2024-12-02T16:34:57Z New Revision: ac7fe426163adf9123473aeb94448cf3e84f6d09 URL: https://github.com/llvm/llvm-project/commit/ac7fe426163adf9123473aeb94448cf3e84f6d09 DIFF: https://github.com/llvm/llvm-project/commit/ac7fe426163adf9123473aeb94448cf3e84f6d09.diff LOG:

[clang] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-02 Thread Kinoshita Kotaro via cfe-commits
https://github.com/kinoshita-fj created https://github.com/llvm/llvm-project/pull/118432 FUJITSU-MONAKA is a CPU we are currently developing. This is the slides for the CPU: https://www.fujitsu.com/downloads/SUPER/topics/isc24/next-arm-based-processor-fujitsu-monaka-and-its-software-ecosystem.

[clang] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-02 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] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Kinoshita Kotaro (kinoshita-fj) Changes FUJITSU-MONAKA is a CPU we are currently developing. This is the slides for the CPU: https://www.fujitsu.com/downloads/SUPER/topics/isc24/next-arm-based-processor-fujitsu-monaka-and-its-softw

[clang] dac9736 - [clang][bytecode][NFC] Diagnose no-constexpr memcpy/strlen versions (#118429)

2024-12-02 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-03T06:59:56+01:00 New Revision: dac9736d05f51b47633b51d599a07ff8d1d65df3 URL: https://github.com/llvm/llvm-project/commit/dac9736d05f51b47633b51d599a07ff8d1d65df3 DIFF: https://github.com/llvm/llvm-project/commit/dac9736d05f51b47633b51d599a07ff8d1d65df3.diff L

[clang] [clang][bytecode][NFC] Diagnose no-constexpr memcpy/strlen versions (PR #118429)

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

[clang] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-02 Thread Kinoshita Kotaro via cfe-commits
kinoshita-fj wrote: @davemgreen @sjoerdmeijer https://github.com/llvm/llvm-project/pull/118432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Handle memmove like memcpy (PR #118431)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118431 This is the same thing for us, except for diagnostic differences. >From ff93c51cbf01df836c93a2076604a2472a90e12c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Dec 2024 06:52:12 +010

[clang] [clang][bytecode] Handle memmove like memcpy (PR #118431)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This is the same thing for us, except for diagnostic differences. --- Full diff: https://github.com/llvm/llvm-project/pull/118431.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cp

[clang] [ASTMatcher] Fix redundant macro expansion checks in getExpansionLocOfMacro (PR #117143)

2024-12-02 Thread via cfe-commits
@@ -697,27 +698,61 @@ static bool isTokenAtLoc(const SourceManager &SM, const LangOptions &LangOpts, return !Invalid && Text == TokenText; } -std::optional -getExpansionLocOfMacro(StringRef MacroName, SourceLocation Loc, - const ASTContext &Context) {

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-02 Thread via cfe-commits
https://github.com/Sirraide commented: Implementation seems fine to me; I can’t speak as to whether this is a necessary addition though. https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-02 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/118428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-02 Thread via cfe-commits
@@ -300,6 +301,36 @@ static MDTuple *emitTopLevelLibraryNode(Module &M, MDNode *RMD, return constructEntryMetadata(nullptr, nullptr, RMD, Properties, Ctx); } +// TODO: We might need to refactor this to be more generic, +// in case we need more metadata to be replaced. +stat

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

2024-12-02 Thread via cfe-commits
@@ -300,6 +301,36 @@ static MDTuple *emitTopLevelLibraryNode(Module &M, MDNode *RMD, return constructEntryMetadata(nullptr, nullptr, RMD, Properties, Ctx); } +// TODO: We might need to refactor this to be more generic, +// in case we need more metadata to be replaced. +stat

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-02 Thread via cfe-commits
@@ -5178,6 +5178,9 @@ GetAttributeHeadingAndSpellings(const Record &Documentation, static void WriteDocumentation(const RecordKeeper &Records, const DocumentationData &Doc, raw_ostream &OS) { + if (const StringRef label = Doc.Documentation->get

[clang] Reapply "[clang] Fix name lookup for dependent bases" (PR #118003)

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

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

2024-12-02 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/116843 >From fed5ce3a776fefe5d0c20c09d49db7be49f59389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Nov 2024 14:3

[clang] [clang][bytecode] Handle memmove like memcpy (PR #118431)

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

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

2024-12-02 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/112035 >From a42effda1d0e8c8fc1e59ea060018225fe9ba914 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH] [WebAssembly] Support the new "Lime1" CPU This adds WebAssembl

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

2024-12-02 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. https://github.com/llvm/llvm-project/pull/117087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Allow fast math flags on fptrunc and fpext (PR #115894)

2024-12-02 Thread Matt Arsenault via cfe-commits
@@ -1875,13 +1873,17 @@ Instruction *InstCombinerImpl::visitFPTrunc(FPTruncInst &FPT) { // fptrunc (select Cond, (fpext X), Y --> select Cond, X, (fptrunc Y) Value *NarrowY = Builder.CreateFPTrunc(Y, Ty); Value *Sel = Builder.CreateSelect(Cond, X, NarrowY, "n

[clang-tools-extra] [clang-tidy] Adjust size-empty doc because C++11 size() is constant-time (PR #117629)

2024-12-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vla` running on `linaro-g3-03` while building `clang-tools-extra` at step 6 "build stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/17/builds/4311 Here is the relevant piec

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/118281 >From ffba96ae0b32a25b810c46c46e9c360c3eef400d Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Mon, 2 Dec 2024 10:03:25 + Subject: [PATCH 1/4] [clang] Warn [[clang::lifetimebound]] misusages on types

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > Can you add a note in llvm-project/clang/docs/ReleaseNotes.rst? done - thanks for pointing this out. https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

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

2024-12-02 Thread Heejin Ahn via cfe-commits
@@ -127,6 +127,13 @@ def : ProcessorModel<"generic", NoSchedModel, FeatureMutableGlobals, FeatureNontrappingFPToInt, FeatureReferenceTypes, FeatureSignExt]>; +// Lime1:

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

2024-12-02 Thread Heejin Ahn via cfe-commits
@@ -167,6 +167,17 @@ bool WebAssemblyTargetInfo::initFeatureMap( Features["reference-types"] = true; Features["sign-ext"] = true; }; + auto addLime1Features = [&]() { +// Lime1: +// +

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

2024-12-02 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. 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] [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (PR #117845)

2024-12-02 Thread Max Winkler via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -std=c++20 -fms-compatibility -fms-compatibility-version=19.33 -emit-llvm %s -o - -triple=x86_64-windows-msvc | FileCheck %s + +template +concept C = requires +{ +{ T::test([](){}) }; +}; + +template +struct Widget {}; + +template +stru

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

2024-12-02 Thread Stephen Verderame 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 stephenverderame wrote: On my local machine, `32,000` seems to work alright and it seem

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
@@ -8612,7 +8612,11 @@ static void HandleLifetimeBoundAttr(TypeProcessingState &State, CurType = State.getAttributedType( createSimpleAttr(State.getSema().Context, Attr), CurType, CurType); +return; } + State.getSema().Diag(Attr.getLoc(), diag::err_

[clang] [Clang] Recover GLTemplateParameterList for generic lambdas in RebuildLambdaScopeInfo (PR #118176)

2024-12-02 Thread Erich Keane via cfe-commits
@@ -15504,10 +15504,25 @@ LambdaScopeInfo *Sema::RebuildLambdaScopeInfo(CXXMethodDecl *CallOperator) { LSI->CallOperator = CallOperator; LSI->Lambda = LambdaClass; LSI->ReturnType = CallOperator->getReturnType(); - // This function in calls in situation where the contex

[clang] [clang][Driver] Use shared_ptr in the Compilation class (PR #116406)

2024-12-02 Thread David Truby via cfe-commits
@@ -61,11 +61,11 @@ class Compilation { OrderedOffloadingToolchains; /// The original (untranslated) input argument list. - llvm::opt::InputArgList *Args; + std::unique_ptr Args; /// The driver translated arguments. Note that toolchains may perform their ///

[clang] 9ea993f - [Clang] Recover GLTemplateParameterList for generic lambdas in RebuildLambdaScopeInfo (#118176)

2024-12-02 Thread via cfe-commits
Author: Younan Zhang Date: 2024-12-03T10:10:17+08:00 New Revision: 9ea993f975b045679907a0789d6fd4d7180593a0 URL: https://github.com/llvm/llvm-project/commit/9ea993f975b045679907a0789d6fd4d7180593a0 DIFF: https://github.com/llvm/llvm-project/commit/9ea993f975b045679907a0789d6fd4d7180593a0.diff

[clang] [AArch64][SME] Fix bug on SMELd1St1 (PR #118109)

2024-12-02 Thread via cfe-commits
wwwatermiao wrote: > It would be good to land this and get this cherry-picked onto the > release/19.x branch. Any objection in merging this @wwwatermiao? Thank you for mentioning this,I think that all the branch would have this problem. While this is my first time merge a request so is this ne

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-02 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/115051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Recover GLTemplateParameterList for generic lambdas in RebuildLambdaScopeInfo (PR #118176)

2024-12-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/118176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][Fuchsia] Avoid "argument unused" warnings (PR #118416)

2024-12-02 Thread Roland McGrath via cfe-commits
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/118416 There should not be an error or warning reported for using redundant options to control what goes into the link. For example, -nolibc -nostdlib. >From 5a039fa6003a7612ddc6603192a121d92d3903cc Mon Sep 17 00:00

[clang] [Driver][Fuchsia] Avoid "argument unused" warnings (PR #118416)

2024-12-02 Thread Roland McGrath via cfe-commits
https://github.com/frobtech updated https://github.com/llvm/llvm-project/pull/118416 >From 5a039fa6003a7612ddc6603192a121d92d3903cc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 2 Dec 2024 13:33:47 -0800 Subject: [PATCH] [Driver][Fuchsia] Avoid "argument unused" warnings There shoul

<    1   2   3   4   5   6   >