[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)) { --

[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
@@ -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] [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
@@ -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
@@ -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
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] [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] [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] [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] [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] 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] 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] [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
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] 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] [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] [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] [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] [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 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] [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] [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][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] 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] 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] [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] [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

[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] 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] 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.

[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] [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] [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] [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] 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] 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] [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] [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)

[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) ---

[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

[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

[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] [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] 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] [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] [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-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-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

[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] 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] [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] 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] [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] [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] 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] [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] [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 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] [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

[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] [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] [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

[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] [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] 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] 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] [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] [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] [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] [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-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
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] [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] 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 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] 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] 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] 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] 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] [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] [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] [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 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 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-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] [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] [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

  1   2   3   4   5   6   >