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

2024-12-02 Thread Roland McGrath via cfe-commits
https://github.com/frobtech ready_for_review https://github.com/llvm/llvm-project/pull/118416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-02 Thread via cfe-commits
wwwatermiao wrote: > @wwwatermiao I noticed the author name in the commit is `unknown`. Is that > intentional? Would you like to change it? Thank you! I'll change it later. https://github.com/llvm/llvm-project/pull/118109 ___ cfe-commits mailing list

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

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Roland McGrath (frobtech) Changes There should not be an error or warning reported for using redundant options to control what goes into the link. For example, -nolibc -nostdlib. --- Full diff: https://github.com/llvm/llvm-project/pull/1

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

2024-12-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/9095 Here is the relevant piece of the b

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

2024-12-02 Thread Dan Gohman via cfe-commits
sunfishcode wrote: That feels to me like something best documented in the definition of Lime itself, rather than in LLVM. I've now opened https://github.com/WebAssembly/tool-conventions/pull/241 to document the inspiration for the name. https://github.com/llvm/llvm-project/pull/112035 ___

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-02 Thread Fangrui Song via cfe-commits
@@ -102,3 +102,17 @@ /* Verify no warning when math-errno is re-enabled for a different veclib (that does not imply -fno-math-errno). */ // RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmPL -fmath-errno -fveclib=LIBMVEC %s 2>&1 | FileCheck --check-prefix=CHECK-REPEAT-

[clang] fc9052e - [clang][bytecode] Check __builtin_memcpy for null pointers (#118313)

2024-12-02 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-03T03:36:57+01:00 New Revision: fc9052ee258e35c5aaba3dc2c1419870975f3a7a URL: https://github.com/llvm/llvm-project/commit/fc9052ee258e35c5aaba3dc2c1419870975f3a7a DIFF: https://github.com/llvm/llvm-project/commit/fc9052ee258e35c5aaba3dc2c1419870975f3a7a.diff L

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-02 Thread Fangrui Song via cfe-commits
@@ -490,6 +490,17 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { + const llvm::Triple &Tr

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-02 Thread Fangrui Song via cfe-commits
@@ -490,6 +490,17 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { MaskRay wrot

[libunwind] [libunwind][Haiku] Improve support (PR #115462)

2024-12-02 Thread Fangrui Song via cfe-commits
=?utf-8?q?J=C3=A9r=C3=B4me?= Duval Message-ID: In-Reply-To: https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/115462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[libunwind] [libunwind][Haiku] Improve support (PR #115462)

2024-12-02 Thread Fangrui Song via cfe-commits
=?utf-8?q?Jérôme?= Duval Message-ID: In-Reply-To: @@ -2749,6 +2755,63 @@ int UnwindCursor::stepThroughSigReturn(Registers_arm64 &) { _isSignalFrame = true; return UNW_STEP_SUCCESS; } +#elif defined(_LIBUNWIND_TARGET_HAIKU) && defined(_LIBUNWIND_TARGET_X86_64) ---

[clang] [clang] Prefer StringRef::substr(0, N) to slice(0, N) (NFC) (PR #113784)

2024-12-02 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Should we agree on #113793, and then take the same decision taken here? I think we can go ahead with this. dblaikie has a comment there at #113793 > Yeah, converging the APIs where there's not huge differences (in this case we > support both, one is a standard name/behavior)

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-12-02 Thread Max Winkler via cfe-commits
@@ -7272,6 +7272,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-fdelayed-template-parsing"); } + if (Args.hasFlag(options::OPT_fms_reference_binding, + options::OPT_fno_ms_reference_binding, +

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

2024-12-02 Thread Jefferson Le Quellec via cfe-commits
@@ -84,9 +84,15 @@ /// Check -Xopenmp-target triggers error when an option requiring arguments is passed to it. // RUN: not %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ -

[clang] b587b91 - [clang][bytecode] Implement __builtin_reduce_xor (#118299)

2024-12-02 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-02T16:04:49+01:00 New Revision: b587b910d5b6fd27f4730ad933a8465528d6f5be URL: https://github.com/llvm/llvm-project/commit/b587b910d5b6fd27f4730ad933a8465528d6f5be DIFF: https://github.com/llvm/llvm-project/commit/b587b910d5b6fd27f4730ad933a8465528d6f5be.diff L

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

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

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread Balazs Benics via cfe-commits
@@ -1068,10 +1068,10 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, llvm::PointerUnion V = getStackOrCaptureRegionForDeclContext(LC, DC, D); -if (V.is()) - return V.get(); +if (isa(V)) steakhal wrote: I wonder if

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread Balazs Benics via cfe-commits
@@ -196,13 +196,13 @@ const PointerToMemberData *BasicValueFactory::accumCXXBase( const NamedDecl *ND = nullptr; llvm::ImmutableList BaseSpecList; - if (PTMDT.isNull() || PTMDT.is()) { -if (PTMDT.is()) - ND = PTMDT.get(); + if (PTMDT.isNull() || isa(PTMDT)) { +

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread Balazs Benics via cfe-commits
@@ -196,13 +196,13 @@ const PointerToMemberData *BasicValueFactory::accumCXXBase( const NamedDecl *ND = nullptr; llvm::ImmutableList BaseSpecList; - if (PTMDT.isNull() || PTMDT.is()) { -if (PTMDT.is()) - ND = PTMDT.get(); + if (PTMDT.isNull() || isa(PTMDT)) { +

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread Balazs Benics via cfe-commits
@@ -222,23 +222,23 @@ void ExplodedNode::NodeGroup::addNode(ExplodedNode *N, ExplodedGraph &G) { GroupStorage &Storage = reinterpret_cast(P); if (Storage.isNull()) { Storage = N; -assert(Storage.is()); +assert(isa(Storage)); return; } ExplodedNodeV

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. Hi Kazu I always welcome your patches! True gems. I left a couple of comments, mostly about following llvm style guides. https://github.com/llvm/llvm-project/pull/118421 ___ cfe-commi

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread Balazs Benics via cfe-commits
@@ -205,10 +205,10 @@ const NamedDecl *nonloc::PointerToMember::getDecl() const { return nullptr; const NamedDecl *ND = nullptr; - if (PTMD.is()) -ND = PTMD.get(); + if (isa(PTMD)) steakhal wrote: I think we should use dyn_cast here. https://git

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/118421 ___ 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 Sam Clegg via cfe-commits
https://github.com/sbc100 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] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-12-02 Thread Derek Schuff via cfe-commits
dschuff wrote: LGTM too; I just noticed that nowhere does the tool-conventions document mention that "lime" is short for "linear memory" and that the intention is that this is the subset of features useful to toolchains or runtimes that focus on linear memory. Maybe we should add that. https

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

2024-12-02 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun updated https://github.com/llvm/llvm-project/pull/117344 From 12a608aa8e6844a171200849e30eedd79cdfb4d8 Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Fri, 22 Nov 2024 16:19:35 + Subject: [PATCH] [Clang] Permit noescape on non-pointer types In modern C++ we

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

2024-12-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/117428 >From 3e25d7ef2e223942298078dace8979905956d05c Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 22 Nov 2024 17:53:24 +0100 Subject: [PATCH 1/6] Add an off-by-default warning to complain about MSVC bitfield

[clang] ccc471f - [clang][bytecode] Implement __builtin_reduce_and (#118289)

2024-12-02 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-02T14:29:38+01:00 New Revision: ccc471fe3eb825db76ec4248c4d0dfe447aa04b1 URL: https://github.com/llvm/llvm-project/commit/ccc471fe3eb825db76ec4248c4d0dfe447aa04b1 DIFF: https://github.com/llvm/llvm-project/commit/ccc471fe3eb825db76ec4248c4d0dfe447aa04b1.diff L

[clang] 814ed93 - [clang] constexpr built-in elementwise bitreverse function. (#118177)

2024-12-02 Thread via cfe-commits
Author: c8ef Date: 2024-12-03T09:33:53+08:00 New Revision: 814ed93e48db4d95965258e64e8580056828a264 URL: https://github.com/llvm/llvm-project/commit/814ed93e48db4d95965258e64e8580056828a264 DIFF: https://github.com/llvm/llvm-project/commit/814ed93e48db4d95965258e64e8580056828a264.diff LOG: [cl

[clang] [clang] constexpr built-in elementwise bitreverse function. (PR #118177)

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

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

2024-12-02 Thread Maksim Ivanov via cfe-commits
@@ -9,11 +9,20 @@ namespace usage_invalid { ~A() [[clang::lifetimebound]]; // expected-error {{cannot be applied to a destructor}} static int *static_class_member() [[clang::lifetimebound]]; // expected-error {{static member function has no implicit object parameter}}

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

2024-12-02 Thread Stephen Verderame via cfe-commits
https://github.com/stephenverderame updated https://github.com/llvm/llvm-project/pull/115395 >From 71702aca23fcc8e2d104d483a40ae16a4a30e48d Mon Sep 17 00:00:00 2001 From: Stephen Verderame Date: Mon, 21 Oct 2024 10:01:43 -0700 Subject: [PATCH] [clang] Use worklist for some CodeGenFunctions Thi

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

2024-12-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/118176 >From 6d55d79dc7a67a94be0f72b15f8da90813ebb9fd Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 30 Nov 2024 23:23:47 +0800 Subject: [PATCH 1/2] [Clang] Recover GLTemplateParameterList for generic lambdas

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

2024-12-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: thanks for the review :) 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] [clang][bytecode] Check __builtin_memcpy for null pointers (PR #118313)

2024-12-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/118313 ___ 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 via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Roland McGrath (frobtech) Changes There should not be an error or warning reported for using redundant options to control what goes into the link. For example, -nolibc -nostdlib. --- Full diff: https://github.com/llvm/llvm-project

[clang] Define a diagnostic group for missing variadic macro arguments (PR #116855)

2024-12-02 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: ping Removing `-Wgnu-zero-variadic-macro-argumentsis` broke multiple projects that had been building fine for years. https://github.com/llvm/llvm-project/pull/116855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/118421 Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast I'm not touching

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::

[clang] FunctionDecl::getFunctionTypeLoc: ignore function type attributes (PR #118420)

2024-12-02 Thread Robert Dazi via cfe-commits
https://github.com/v01dXYZ created https://github.com/llvm/llvm-project/pull/118420 Related to #118290. >From c7e93d177aef1214be6dea9e408e547b6d363e33 Mon Sep 17 00:00:00 2001 From: v01dxyz Date: Tue, 3 Dec 2024 04:52:33 +0100 Subject: [PATCH] FunctionDecl::getFunctionTypeLoc: ignore function

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast I'm n

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

2024-12-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/118428 The existing mechanism being used is to manually add a reference in the documentation. These references link to the beginning of the text rather than the heading for the attribute which is what this PR allows.

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

2024-12-02 Thread David Spickett via cfe-commits
DavidSpickett wrote: @tobiasgrosser (because for some reason I can't add you as a reviewer directly) https://github.com/llvm/llvm-project/pull/118309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[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 created https://github.com/llvm/llvm-project/pull/118429 None >From 5a16e4d366ca0600a0b8fd98265745223cd8aec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Dec 2024 06:34:51 +0100 Subject: [PATCH] [clang][bytecode][NFC] Diagnose no-constex

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

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes The existing mechanism being used is to manually add a reference in the documentation. These references link to the beginning of the text rather than the heading for the attribute which is what this PR allows.

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

2024-12-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/118429.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+22-2) ``diff diff --git a/clang/lib/AST/ByteCode/I

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

2024-12-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/118428 >From aea2b4001aa8e9239909875153152083b56a6a59 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 2 Dec 2024 21:25:54 -0800 Subject: [PATCH] Add support for referencable labels for attribute documentation Th

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

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

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-02 Thread Balazs Benics via cfe-commits
@@ -211,8 +211,8 @@ class MallocSizeofChecker : public Checker { continue; const TypeSourceInfo *TSI = nullptr; -if (CallRec.CastedExprParent.is()) { - TSI = CallRec.CastedExprParent.get() +if (isa(CallRec.CastedExprParent)) { --

<    1   2   3   4   5   6