[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alan Zhao (alanzhao1) Changes This bug is caused by parenthesized list initialization not being implemented in `CodeGenFunction::EmitNewArrayInitializer(...)`. Parenthesized list initialization of `struct`s with `operator new` already w

[llvm] [libcxx] [clang-tools-extra] [mlir] [flang] [compiler-rt] [libc] [clang] [mlir][Linalg] Support dynamic tiles in `lower_pack` transform (PR #76003)

2024-01-04 Thread via cfe-commits
https://github.com/srcarroll updated https://github.com/llvm/llvm-project/pull/76003 >From 860a2f794bdf12ff1f08d4802570757e805264b0 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 18 Dec 2023 15:53:41 -0600 Subject: [PATCH 1/8] [mlir][Linalg] Support dynamic sizes in `lower_pack` transform ---

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 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 a7a78fd427569a7ad8a27e682a66fe414f004a35 ee4e3c8634bb876166ee753a4ebcbf3c1699a175 --

[libcxx] [llvm] [clang] "Reapply "[Sema] Fix crash on invalid code with parenthesized aggrega… (PR #76833)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Mark de Wever (mordante) Changes …te initialization" (#76272)"" With updates the libc++ tests. This reverts commit 2205d23 and relands 86dc6e1 and 7ab16fb. Original commit was reverted because of failing libc++ tests, see #76232 for the

[clang] [clang][analyzer] Add missing stream related functions to StdCLibraryFunctionsChecker. (PR #76979)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes Some stream functions were recently added to `StreamChecker` that were not modeled by `StdCLibraryFunctionsChecker`. To ensure consistency these functions are add

[libc] [mlir] [clang] [clang-tools-extra] [llvm] [libc][math] Fix `is_quiet_nan` function in FPBits (PR #76931)

2024-01-04 Thread via cfe-commits
https://github.com/lntue closed https://github.com/llvm/llvm-project/pull/76931 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [mlir] [clang] [clang-tools-extra] [llvm] [libcxxabi] [OpenMP] Patch for Support to loop bind clause : Checking Parent Region (PR #76938)

2024-01-04 Thread via cfe-commits
https://github.com/SunilKuravinakop updated https://github.com/llvm/llvm-project/pull/76938 >From 1dcd4703002acdde370a285089008e409043717b Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop Date: Thu, 4 Jan 2024 04:08:28 -0600 Subject: [PATCH 1/2] Changes uploaded to the phabricator on Dec 16th a

[clang] e78a1f4 - [Clang] Fix the instantiation of return type requirements in lambda bodies (#76967)

2024-01-04 Thread via cfe-commits
Author: 刘雨培 Date: 2024-01-05T01:32:10+08:00 New Revision: e78a1f491cbc0a57de7bf86058359dd0bd282540 URL: https://github.com/llvm/llvm-project/commit/e78a1f491cbc0a57de7bf86058359dd0bd282540 DIFF: https://github.com/llvm/llvm-project/commit/e78a1f491cbc0a57de7bf86058359dd0bd282540.diff LOG: [Cla

[clang] [Clang] Fix the instantiation of return type requirements in lambda bodies (PR #76967)

2024-01-04 Thread via cfe-commits
https://github.com/LYP951018 closed https://github.com/llvm/llvm-project/pull/76967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)

2024-01-04 Thread via cfe-commits
https://github.com/rsandifo-arm edited https://github.com/llvm/llvm-project/pull/76971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)

2024-01-04 Thread via cfe-commits
https://github.com/rsandifo-arm commented: Thanks for doing this, looks good! I've got some initial comments below, but I think they probably repeat for other parts of the patch. The two main ones are: * We should consume arguments to attribute keywords iff the attribute is defined to take a

[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)

2024-01-04 Thread via cfe-commits
@@ -3696,6 +3696,12 @@ def err_sme_definition_using_sm_in_non_sme_target : Error< "function executed in streaming-SVE mode requires 'sme'">; def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; +def err_conflicting_attribute

[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)

2024-01-04 Thread via cfe-commits
@@ -6852,30 +6852,73 @@ without changing modes. }]; } -def ArmSmeSharedZADocs : Documentation { +def ArmInDocs : Documentation { let Category = DocCatArmSmeAttributes; let Content = [{ -The ``__arm_shared_za`` keyword applies to prototyped function types and specifies

[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)

2024-01-04 Thread via cfe-commits
@@ -6787,6 +6787,9 @@ void Parser::ParseDirectDeclarator(Declarator &D) { // For consistency with attribute parsing. Diag(Tok, diag::err_keyword_not_allowed) << Tok.getIdentifierInfo(); ConsumeToken(); + BalancedDelimiterTracker T(*this, tok::l_paren); --

[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)

2024-01-04 Thread via cfe-commits
@@ -4033,12 +4033,27 @@ class FunctionType : public Type { SME_NormalFunction = 0, SME_PStateSMEnabledMask = 1 << 0, SME_PStateSMCompatibleMask = 1 << 1, -SME_PStateZASharedMask = 1 << 2, -SME_PStateZAPreservedMask = 1 << 3, -SME_AttributeMask = 0b111'11

[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)

2024-01-04 Thread via cfe-commits
@@ -3175,11 +3175,16 @@ static void checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall, } static bool hasSMEZAState(const FunctionDecl *FD) { - if (FD->hasAttr()) -return true; - if (const auto *T = FD->getType()->getAs()) -if (T->getAArch64SMEAttributes() & Functi

[clang] [Clang][AArch64] Change SME attributes for shared/new/preserved state. (PR #76971)

2024-01-04 Thread via cfe-commits
@@ -1767,14 +1767,22 @@ static void AddAttributesFromFunctionProtoType(ASTContext &Ctx, FPT->isNothrow()) FuncAttrs.addAttribute(llvm::Attribute::NoUnwind); - if (FPT->getAArch64SMEAttributes() & FunctionType::SME_PStateSMEnabledMask) + unsigned SMEBits = FPT->get

[compiler-rt] [flang] [clang-tools-extra] [libcxx] [llvm] [libc] [clang] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-04 Thread via cfe-commits
@@ -0,0 +1,157 @@ +//===--- MoveSharedPointerContentsCheck.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

[llvm] [clang] [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs (PR #76777)

2024-01-04 Thread via cfe-commits
koute wrote: > But I think this patch can work just fine [...] Apart from vendors' need, the > request is mainly from Rust language community I think. To put our 3 cents here, [we](https://github.com/paritytech) also need it. We are (well, it's mostly me right now since it's still a prototype)

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread via cfe-commits
@@ -163,6 +170,40 @@ void attribute_const() { std::as_const(n); // expected-warning {{ignoring return value}} } +struct D { + void* operator new(__SIZE_TYPE__, D&&(*)(D&)); + void* operator new(__SIZE_TYPE__, D*(*)(D&)); + void* operator new(__SIZE_TYPE__, const D&(*)(D&)

[clang-tools-extra] [flang] [llvm] [Flang] make ppc unsupported for x86_64 test case (NFC) (PR #73903)

2024-01-04 Thread via cfe-commits
@@ -7,7 +7,7 @@ ! ! This test is for x86_64, where exponent-letter 'q' is for ! 10-byte extended precision -! UNSUPPORTED: system-windows +! UNSUPPORTED: system-windows, system-aix madanial0 wrote: The underflow failure only occurs on AIX for powerpc not on li

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/75883 >From f51b382fd33d4cf3f75bdaa172bb8697a6cadc9e Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 19 Dec 2023 02:48:25 +0100 Subject: [PATCH 1/4] [Clang] Support MSPropertyRefExpr as placement arg to new-expres

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread via cfe-commits
@@ -163,6 +170,40 @@ void attribute_const() { std::as_const(n); // expected-warning {{ignoring return value}} } +struct D { + void* operator new(__SIZE_TYPE__, D&&(*)(D&)); + void* operator new(__SIZE_TYPE__, D*(*)(D&)); + void* operator new(__SIZE_TYPE__, const D&(*)(D&)

[llvm] [clang] [clang-tools-extra] [libc] [flang] [libcxx] [compiler-rt] [mlir] [mlir][Linalg] Support dynamic tiles in `lower_pack` transform (PR #76003)

2024-01-04 Thread via cfe-commits
srcarroll wrote: It was suggested to me by @chelini to only have the `reshape` op to handle all cases and get rid of the `expand_shape` op. We can then implement a canonicalizer to convert when valid. I'm all for this, however want to make sure this is the direction we want to go before I st

[llvm] [clang] [clang-tools-extra] [libc] [flang] [libcxxabi] [libcxx] [compiler-rt] [lldb] Move nondiscard tests of ranges::contains() to the right place. (PR #76887)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/76887 >From 9b90c41bd209a49de85987529bd7286401b01ef2 Mon Sep 17 00:00:00 2001 From: Zijun Zhao Date: Wed, 3 Jan 2024 18:27:09 -0800 Subject: [PATCH] Move nondiscard tests of ranges::contains() to the right place.

[clang] [llvm] [mlir] [flang] [clang-tools-extra] [compiler-rt] [lldb] [lld] [libc] [polly] [libcxxabi] [libcxx] Make clang report invalid target versions. (PR #75373)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/75373 >From 74f256d8a77ee2ba8e0d5bbb6519aa2729cf94d5 Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Wed, 13 Dec 2023 20:07:45 + Subject: [PATCH 01/13] Make clang report garbage target versions. Clang always s

[clang] [llvm] [mlir] [flang] [clang-tools-extra] [compiler-rt] [lldb] [lld] [libc] [polly] [libcxxabi] [libcxx] Make clang report invalid target versions. (PR #75373)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK ready_for_review https://github.com/llvm/llvm-project/pull/75373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/75883 >From f51b382fd33d4cf3f75bdaa172bb8697a6cadc9e Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 19 Dec 2023 02:48:25 +0100 Subject: [PATCH 1/5] [Clang] Support MSPropertyRefExpr as placement arg to new-expres

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread via cfe-commits
@@ -130,27 +137,24 @@ C &&(&rMove)(C&) = std::move; // #8 expected-note {{instantiation of}} C &&(&rForward)(C&) = std::forward; // #9 expected-note {{instantiation of}} int (&rUnrelatedMove)(B, B) = std::move; -#if __cplusplus <= 201703L -// expected-warning@#1 {{non-address

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/75883 >From c46f8efd68bf5c32164a64de36081e65a7171763 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 19 Dec 2023 02:48:25 +0100 Subject: [PATCH 1/5] [Clang] Support MSPropertyRefExpr as placement arg to new-expres

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/75883 >From c46f8efd68bf5c32164a64de36081e65a7171763 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 19 Dec 2023 02:48:25 +0100 Subject: [PATCH 1/6] [Clang] Support MSPropertyRefExpr as placement arg to new-expres

[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-04 Thread via cfe-commits
Sirraide wrote: Just did a rebase and also updated the release notes to mention these changes https://github.com/llvm/llvm-project/pull/75883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/76976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 Thread via cfe-commits
https://github.com/cor3ntin commented: Sema changes look okay. I'd like @erichkeane to look at the codegen tests https://github.com/llvm/llvm-project/pull/76976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 Thread via cfe-commits
@@ -1073,7 +1075,7 @@ void CodeGenFunction::EmitNewArrayInitializer( return; } -InitListElements = ILE->getNumInits(); +InitListElements = ILE ? ILE->getNumInits() : CPLIE->getInitExprs().size(); cor3ntin wrote: This is not great, but I thin

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-04 Thread via cfe-commits
@@ -1101,7 +1103,8 @@ void CodeGenFunction::EmitNewArrayInitializer( } CharUnits StartAlign = CurPtr.getAlignment(); -for (unsigned i = 0, e = ILE->getNumInits(); i != e; ++i) { +ArrayRef InitExprs = ILE ? ILE->inits() : CPLIE->getInitExprs(); +for (unsigne

[clang-tools-extra] [flang] [llvm] [Flang] make ppc unsupported for x86_64 test case (NFC) (PR #73903)

2024-01-04 Thread via cfe-commits
https://github.com/madanial0 closed https://github.com/llvm/llvm-project/pull/73903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [llvm] [libcxx] [flang] [libc] [libcxxabi] [clang-tools-extra] [clang] [compiler-rt] Move nondiscard tests of ranges::contains() to the right place. (PR #76887)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/76887 >From 9b90c41bd209a49de85987529bd7286401b01ef2 Mon Sep 17 00:00:00 2001 From: Zijun Zhao Date: Wed, 3 Jan 2024 18:27:09 -0800 Subject: [PATCH 1/2] Move nondiscard tests of ranges::contains() to the right pl

[lldb] [llvm] [libcxx] [flang] [libc] [libcxxabi] [clang-tools-extra] [clang] [compiler-rt] Move nondiscard tests of ranges::contains() to the right place. (PR #76887)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/76887 >From 9b90c41bd209a49de85987529bd7286401b01ef2 Mon Sep 17 00:00:00 2001 From: Zijun Zhao Date: Wed, 3 Jan 2024 18:27:09 -0800 Subject: [PATCH 1/2] Move nondiscard tests of ranges::contains() to the right pl

[lldb] [llvm] [libcxx] [flang] [libc] [libcxxabi] [clang-tools-extra] [clang] [compiler-rt] Move nondiscard tests of ranges::contains() to the right place. (PR #76887)

2024-01-04 Thread via cfe-commits
ZijunZhaoCCK wrote: > Maybe you need to update the status page, papers and release notes too: > https://libcxx.llvm.org/Status/Ranges.html > https://libcxx.llvm.org/ReleaseNotes/18.html Thank you for reminding! I will update those files after I finish `ranges::contains_subrange`. https://git

[clang] [Clang][Parser] Fix crash of clang when using C++ constructs like :: in C code (PR #74926)

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

[clang] [Clang][Parser] Fix crash of clang when using C++ constructs like :: in C code (PR #74926)

2024-01-04 Thread via cfe-commits
cor3ntin wrote: Thanks for working on that! https://github.com/llvm/llvm-project/pull/74926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b5a3e96 - [Clang][Parser] Fix crash of clang when using C++ constructs like :: in C code (#74926)

2024-01-04 Thread via cfe-commits
Author: ChipsSpectre Date: 2024-01-04T21:04:54+01:00 New Revision: b5a3e9639291359d5c9e16f0610393d92bc7d4c2 URL: https://github.com/llvm/llvm-project/commit/b5a3e9639291359d5c9e16f0610393d92bc7d4c2 DIFF: https://github.com/llvm/llvm-project/commit/b5a3e9639291359d5c9e16f0610393d92bc7d4c2.diff

[clang] [Clang][Parser] Fix crash of clang when using C++ constructs like :: in C code (PR #74926)

2024-01-04 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/74926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [MinGW] Don't look for a GCC in path if the install base has a proper mingw sysroot (PR #76949)

2024-01-04 Thread via cfe-commits
https://github.com/jeremyd2019 approved this pull request. > Looks mostly good to me, but I wonder if we should change testTriple as well. I thought so too based on the comment, but reviewing the code it seems `testTriple` is trying to find evidence that a given triple (and more specifically a

[clang-tools-extra] 03ef103 - [clang-tidy] Fix bug in modernize-use-emplace (#66169)

2024-01-04 Thread via cfe-commits
Author: Chris Cotter Date: 2024-01-04T21:47:14+01:00 New Revision: 03ef103235752830da7b9ce5e825c0e3ddf7f45a URL: https://github.com/llvm/llvm-project/commit/03ef103235752830da7b9ce5e825c0e3ddf7f45a DIFF: https://github.com/llvm/llvm-project/commit/03ef103235752830da7b9ce5e825c0e3ddf7f45a.diff

[clang] [OpenACC] Implement 'default' clause parsing. (PR #77002)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes A simple clause that is permitted on a few different constructs, 'default' takes a required parameter of either 'none' or 'present'. This patch implements parsing for it. --- Full diff: https://github.c

[clang] [OpenMP] Change `__tgt_device_image` to point to the image (PR #77003)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: We use the OffloadBinary to contain bundled offloading objects used to support many images / targets at the same time. The `__tgt_device_info` struct used to contain a pointer to this underlying binar

[libcxx] [lld] [libc] [clang-tools-extra] [polly] [compiler-rt] [llvm] [clang] [flang] [libcxxabi] [mlir] [lldb] Make clang report invalid target versions. (PR #75373)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/75373 >From 74f256d8a77ee2ba8e0d5bbb6519aa2729cf94d5 Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Wed, 13 Dec 2023 20:07:45 + Subject: [PATCH 01/13] Make clang report garbage target versions. Clang always s

[clang] [flang] [lldb] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2024-01-04 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 b047c9116432375586ddf7f01bf272f99d9a005c 8040f300b57fe0706ee0d5b81678ee9b7927c796 --

[compiler-rt] [flang] [llvm] [lldb] [libc] [libcxx] [clang-tools-extra] [clang] [libcxxabi] [lld] [mlir] [libc++][ranges] Implement ranges::contains_subrange (PR #66963)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/66963 >From 647f5fe641b30c874bab770fced9fcec9b601161 Mon Sep 17 00:00:00 2001 From: Zijun Zhao Date: Wed, 13 Sep 2023 14:26:01 -0700 Subject: [PATCH 1/7] [libc++] Implement ranges::contains_subrange --- libcxx/i

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-04 Thread via cfe-commits
https://github.com/XDeme created https://github.com/llvm/llvm-project/pull/77013 … return type. The behavior now is consistent with the non template version. Enabled and updated old test. >From 45d01cbc7ec958518b1739daa9e9b0dc35c2d194 Mon Sep 17 00:00:00 2001 From: XDeme Date: Thu, 4 Jan 2024

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (XDeme) Changes … return type. The behavior now is consistent with the non template version. Enabled and updated old test. --- Full diff: https://github.com/llvm/llvm-project/pull/77013.diff 2 Files Affected: - (modified) c

[compiler-rt] [clang] [flang] [clang-tools-extra] [llvm] [libcxxabi] [libcxx] [lldb] [libc] Move nondiscard tests of ranges::contains() to the right place. (PR #76887)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK closed https://github.com/llvm/llvm-project/pull/76887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [lld] [mlir] [libc] [llvm] [clang] [clang-tools-extra] [compiler-rt] [libcxxabi] [flang] [libcxx] [libc++][ranges] Implement ranges::contains_subrange (PR #66963)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/66963 >From 647f5fe641b30c874bab770fced9fcec9b601161 Mon Sep 17 00:00:00 2001 From: Zijun Zhao Date: Wed, 13 Sep 2023 14:26:01 -0700 Subject: [PATCH 1/7] [libc++] Implement ranges::contains_subrange --- libcxx/i

[clang] [Clang][OpenMP] Fix stdio.h wrapper when glibc includes again (PR #77017)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Joel E. Denny (jdenny-ornl) Changes Since D154036 landed (2a65d0388ca0 on July 7, 2023), I've been seeing many (40-50) libomptarget test failures with errors like the following on some of our test systems: ``` /auto/software/gcc/x8

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Rahman Lavaee (rlavaee) Changes Today `-split-machine-functions` and `-fbasic-block-sections={all,list}` cannot be combined with `-basic-block-sections=labels` (the labels option will be ignored). The inconsistency comes from

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-binary-utilities Author: Rahman Lavaee (rlavaee) Changes Today `-split-machine-functions` and `-fbasic-block-sections={all,list}` cannot be combined with `-basic-block-sections=labels` (the labels option will be ignored). The inconsistency co

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld-elf @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Rahman Lavaee (rlavaee) Changes Today `-split-machine-functions` and `-fbasic-block-sections={all,list}` cannot be combined with `-basic-block-sections=labels` (the labels

[clang] [clang] Fix incorrect line numbers with -E and raw string (#47577) (PR #77021)

2024-01-04 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 i

[clang] [clang] Fix incorrect line numbers with -E and raw string (#47577) (PR #77021)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Steve Cornett (stevecor) Changes When printing preprocessed tokens, handle newlines in string literals because raw string literals may contain newlines. --- Full diff: https://github.com/llvm/llvm-project/pull/77021.diff 2 Files Affecte

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2024-01-04 Thread via cfe-commits
@@ -586,6 +586,16 @@ void swap(int&, int&) { throw 1; } +void iter_swap(int&, int&) { + // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: an exception may be thrown in function 'iter_swap' which should not throw exceptions + throw 1; +} + +void iter_move(int&, int&) { -

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-04 Thread via cfe-commits
@@ -3914,7 +3914,15 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { // (this would still leave us with an ambiguity between template function // and class declarations). if (FormatTok->isOneOf(tok::colon, tok::less)) { XDeme wrote: Yes, that

[clang] [llvm] [PseudoProbe] Mix and reorder block and call probe ID in lexical order (PR #75092)

2024-01-04 Thread via cfe-commits
WenleiHe wrote: > Agreed with this concern. To do this, we probably also need a flag in the > binary, because otherwise if we use the new toolchain for prof-gen but the > binary built on the old toolchain, we then would generate a profile with this > flag on but the order is the old one. My un

[flang] [llvm] [clang-tools-extra] [libcxx] [compiler-rt] [mlir] [libc] [clang] [mlir][Linalg] Support dynamic tiles in `lower_pack` transform (PR #76003)

2024-01-04 Thread via cfe-commits
srcarroll wrote: > I'm -1 on using `tensor.reshape` op. IMO, we should only use > tensor.expand/collapse_shape; they work much better with existing > transformations. > > Out of curiosity, what use case do you have in mind? Why do we lower fully > dynamic pack op? If it is at high level graph

[clang] [flang] [mlir] [libc] [compiler-rt] [clang-tools-extra] [libcxx] [llvm] [mlir][Linalg] Support dynamic tiles in `lower_pack` transform (PR #76003)

2024-01-04 Thread via cfe-commits
srcarroll wrote: It would be easy enough for me to change what I have to only do expand and only match fail on completely impossible cases https://github.com/llvm/llvm-project/pull/76003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-04 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/77013 >From 45d01cbc7ec958518b1739daa9e9b0dc35c2d194 Mon Sep 17 00:00:00 2001 From: XDeme Date: Thu, 4 Jan 2024 19:04:21 -0300 Subject: [PATCH 1/2] [clang-format] Handle templated elaborated type specifier in function re

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-04 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/77013 >From 45d01cbc7ec958518b1739daa9e9b0dc35c2d194 Mon Sep 17 00:00:00 2001 From: XDeme Date: Thu, 4 Jan 2024 19:04:21 -0300 Subject: [PATCH 1/3] [clang-format] Handle templated elaborated type specifier in function re

[clang] [clang-format] Handle templated elaborated type specifier in function… (PR #77013)

2024-01-04 Thread via cfe-commits
@@ -3914,7 +3914,15 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { // (this would still leave us with an ambiguity between template function // and class declarations). if (FormatTok->isOneOf(tok::colon, tok::less)) { XDeme wrote: I've upda

[clang] Update Clang.cpp (PR #77031)

2024-01-04 Thread via cfe-commits
https://github.com/hw-1 created https://github.com/llvm/llvm-project/pull/77031 fix bug with PCH check failed, detail with https://github.com/llvm/llvm-project/issues/76923 >From 50e69eac786a646491e278478bb096e361d6c4c1 Mon Sep 17 00:00:00 2001 From: hw-1 <8053554+h...@users.noreply.github.com>

[clang] Update Clang.cpp (PR #77031)

2024-01-04 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 i

[clang] Update Clang.cpp (PR #77031)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: hw-1 (hw-1) Changes fix bug with PCH check failed, detail with https://github.com/llvm/llvm-project/issues/76923 --- Full diff: https://github.com/llvm/llvm-project/pull/77031.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolCh

[clang] Update Clang.cpp (PR #77031)

2024-01-04 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 c1eef483b2c1ab2564e0ee1e4d1a30db11f8049f 50e69eac786a646491e278478bb096e361d6c4c1 --

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (PR #74775)

2024-01-04 Thread via cfe-commits
https://github.com/sethp edited https://github.com/llvm/llvm-project/pull/74775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [mlir] [flang] [clang-tools-extra] [compiler-rt] [libcxx] [llvm] [clang] [mlir][Linalg] Support dynamic tiles in `lower_pack` transform (PR #76003)

2024-01-04 Thread via cfe-commits
srcarroll wrote: > To be clear, I am not saying that this is not useful. I just don't know why > this is needed. Fair enough. Me neither. :) https://github.com/llvm/llvm-project/pull/76003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (PR #74775)

2024-01-04 Thread via cfe-commits
@@ -404,29 +691,126 @@ constexpr unsigned char identity3b = __builtin_bit_cast(unsigned char, identity3 namespace test_bool { -constexpr bool test_bad_bool = bit_cast('A'); // expected-error {{must be initialized by a constant expression}} expected-note{{in call}} +// expec

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (PR #74775)

2024-01-04 Thread via cfe-commits
@@ -0,0 +1,82 @@ +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -triple x86_64-apple-macosx10.14.0 %s +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -triple x86_64-apple-macosx10.14.0 %s -fno-signed-char +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -triple a

[clang] [CMake][Release] Add option for enabling LTO to cache file (PR #77035)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes This option is LLVM_RELEASE_ENABLE_LTO and it's turned on by default. --- Full diff: https://github.com/llvm/llvm-project/pull/77035.diff 1 Files Affected: - (modified) clang/cmake/caches/Release.cmake (+

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (PR #74775)

2024-01-04 Thread via cfe-commits
@@ -404,29 +691,126 @@ constexpr unsigned char identity3b = __builtin_bit_cast(unsigned char, identity3 namespace test_bool { -constexpr bool test_bad_bool = bit_cast('A'); // expected-error {{must be initialized by a constant expression}} expected-note{{in call}} +// expec

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (PR #74775)

2024-01-04 Thread via cfe-commits
@@ -485,16 +869,16 @@ typedef bool bool17 __attribute__((ext_vector_type(17))); typedef bool bool32 __attribute__((ext_vector_type(32))); typedef bool bool128 __attribute__((ext_vector_type(128))); -static_assert(bit_cast(bool8{1,0,1,0,1,0,1,0}) == (LITTLE_END ? 0x55 : 0xAA),

[lld] [libcxxabi] [clang] [clang-tools-extra] [compiler-rt] [lldb] [flang] [libcxx] [mlir] [libc] [llvm] [libc++][ranges] Implement ranges::contains_subrange (PR #66963)

2024-01-04 Thread via cfe-commits
@@ -0,0 +1,303 @@ +//===--===// +// +// 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: Apa

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (PR #74775)

2024-01-04 Thread via cfe-commits
@@ -6901,51 +6916,260 @@ bool HandleOperatorDeleteCall(EvalInfo &Info, const CallExpr *E) { //===--===// namespace { -class BitCastBuffer { - // FIXME: We're going to need bit-level granularity when we supp

[libcxxabi] [llvm] [flang] [libc] [mlir] [clang] [libcxx] [clang-tools-extra] [compiler-rt] [lldb] [lld] [libc++][ranges] Implement ranges::contains_subrange (PR #66963)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/66963 >From 647f5fe641b30c874bab770fced9fcec9b601161 Mon Sep 17 00:00:00 2001 From: Zijun Zhao Date: Wed, 13 Sep 2023 14:26:01 -0700 Subject: [PATCH 1/8] [libc++] Implement ranges::contains_subrange --- libcxx/i

[compiler-rt] [mlir] [libcxx] [clang-tools-extra] [lld] [clang] [flang] [libcxxabi] [libc] [lldb] [llvm] [libc++][ranges] Implement ranges::contains_subrange (PR #66963)

2024-01-04 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/66963 >From 647f5fe641b30c874bab770fced9fcec9b601161 Mon Sep 17 00:00:00 2001 From: Zijun Zhao Date: Wed, 13 Sep 2023 14:26:01 -0700 Subject: [PATCH 1/8] [libc++] Implement ranges::contains_subrange --- libcxx/i

[llvm] [clang] [libc] [compiler-rt] [flang] [polly] [clang-tools-extra] [openmp] [libcxx] [lld] [mlir] [CostModel][X86] Fix fpext conversion cost for 16 elements (PR #76278)

2024-01-04 Thread via cfe-commits
https://github.com/HaohaiWen updated https://github.com/llvm/llvm-project/pull/76278 >From 87f3d68e82dcc752aa727f62b8b1b56b1257b343 Mon Sep 17 00:00:00 2001 From: Haohai Wen Date: Sat, 23 Dec 2023 13:16:02 +0800 Subject: [PATCH 1/3] [CostModel][X86] Track fpext conversion for 16 elements ---

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (PR #74775)

2024-01-04 Thread via cfe-commits
@@ -6901,51 +6916,260 @@ bool HandleOperatorDeleteCall(EvalInfo &Info, const CallExpr *E) { //===--===// namespace { -class BitCastBuffer { - // FIXME: We're going to need bit-level granularity when we supp

[flang] [mlir] [llvm] [libc] [lld] [clang] [openmp] [compiler-rt] [polly] [libcxx] [clang-tools-extra] [CostModel][X86] Fix fpext conversion cost for 16 elements (PR #76278)

2024-01-04 Thread via cfe-commits
HaohaiWen wrote: There's cross iteration true dependency in previous experiment. ``` vcvtps2pd zmm2, ymm0 vextractf64x4 ymm0, zmm0, 1 vcvtps2pd zmm1, ymm0 ``` The second cvt and first cvt of the next iteration need to wait for finish of vextract64x4. Therefore its cost is 5. In real scenario, va

[clang] Improve modeling of 'getcwd' in the StdLibraryFunctionsChecker (PR #77040)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ben Shi (benshi001) Changes 1. Improve the 'errno' modeling. 2. Improve the buffer size argument's constraint. --- Full diff: https://github.com/llvm/llvm-project/pull/77040.diff 4 Files Affected: - (modified) clang/lib/StaticAnalyzer/C

[clang-tools-extra] [libcxx] [mlir] [openmp] [llvm] [clang] [lldb] [SEH] Fix register liveness verification for EHa (PR #76933)

2024-01-04 Thread via cfe-commits
https://github.com/HaohaiWen updated https://github.com/llvm/llvm-project/pull/76933 >From 8305e5e15eaaedba58a57b179e32c6d4b2a11a44 Mon Sep 17 00:00:00 2001 From: Haohai Wen Date: Thu, 4 Jan 2024 15:35:52 +0800 Subject: [PATCH 1/5] [SEH] Add test to track EHa register liveness verification Th

[llvm] [clang] New calling convention preserve_none (PR #76868)

2024-01-04 Thread via cfe-commits
@@ -416,6 +416,12 @@ added in the future: This calling convention, like the `PreserveMost` calling convention, will be used by a future version of the ObjectiveC runtime and should be considered experimental at this time. +"``preserve_nonecc``" - The `PreserveNone`

[clang] [clang-format] Fix crash involving array designators and dangling comma (PR #77045)

2024-01-04 Thread via cfe-commits
https://github.com/XDeme created https://github.com/llvm/llvm-project/pull/77045 Fixes llvm/llvm-project#76716 Added a check to prevent null deferencing >From d9cbbe48b96d27bff3fc926b60d039ed05f00489 Mon Sep 17 00:00:00 2001 From: XDeme Date: Fri, 5 Jan 2024 01:23:16 -0300 Subject: [PATCH] [cla

[clang] [clang-format] Fix crash involving array designators and dangling comma (PR #77045)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (XDeme) Changes Fixes llvm/llvm-project#76716 Added a check to prevent null deferencing --- Full diff: https://github.com/llvm/llvm-project/pull/77045.diff 2 Files Affected: - (modified) clang/lib/Format/WhitespaceManager.cp

[clang-tools-extra] [openmp] [libc] [compiler-rt] [llvm] [clang] [lld] [flang] [libcxx] [lldb] [PGO][OpenMP] Instrumentation for GPU devices (PR #76587)

2024-01-04 Thread via cfe-commits
WenleiHe wrote: > ongoing effort to extends PGO instrumentation to GPU device code Is there a high level description for this effort and its goal? Traditional compiler PGO is mostly for profiling control-flow, but we don't usually have a lot of control flow for GPU kernels. https://github.co

[clang-tools-extra] [libc] [mlir] [compiler-rt] [llvm] [clang] [lld] [libcxxabi] [flang] [libcxx] [lldb] [clang] static operators should evaluate object argument (PR #68485)

2024-01-04 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 054b5fc0fd41bcbadcc6967c39a5f6bb151bdcd1 eb42407a523f9a79afca4fbf221b344330888cc6 --

[clang] [llvm] [openmp] [lldb] [clang-tools-extra] [mlir] [libcxx] [SEH] Fix register liveness verification for EHa (PR #76933)

2024-01-04 Thread via cfe-commits
HaohaiWen wrote: Refer https://github.com/llvm/llvm-project/pull/76921 for failure output https://github.com/llvm/llvm-project/pull/76933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[llvm] [clang-tools-extra] create new clang-tidy check to add namespaces to symbol references (PR #70621)

2024-01-04 Thread via cfe-commits
https://github.com/daltairwalter updated https://github.com/llvm/llvm-project/pull/70621 >From f44d7746a990a3bd8e53de047a30baee4da2c790 Mon Sep 17 00:00:00 2001 From: Daniel Walter Date: Mon, 30 Oct 2023 00:08:56 -0500 Subject: [PATCH 1/9] Initial commit of add new check before changes --- ..

[clang-tools-extra] [llvm] [lldb] [clang] [openmp] [mlir] [libcxx] [SEH] Fix register liveness verification for EHa (PR #76933)

2024-01-04 Thread via cfe-commits
@@ -0,0 +1,65 @@ +; RUN: llc --verify-machineinstrs < %s +source_filename = "test.cpp" +target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-windows-msvc19.12.0" + +$"?test@Test@@Plugin@@Host@@@Z" = comd

[clang] [clang] Add per-global code model attribute (PR #72078)

2024-01-04 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From e3863873ab817dacf8680763bb42d91f005fe5ea Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH 01/10] [clang] Add per-global code model attribute This patch adds a pe

[clang] [clang] Add per-global code model attribute (PR #72078)

2024-01-04 Thread via cfe-commits
@@ -3369,6 +3369,36 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static void handleCodeModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + StringRef CM; + StringRef Str; + SourceLocation LiteralLoc; + bool Ok = false; + // Check tha

[clang] [llvm] [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs (PR #76777)

2024-01-04 Thread via cfe-commits
koute wrote: Side note: shouldn't we also update `compiler-rt/lib/builtins/riscv/{save, restore}.S`? E.g. with something like this: ```patch diff --git a/compiler-rt/lib/builtins/riscv/restore.S b/compiler-rt/lib/builtins/riscv/restore.S index 73f64a920d66..2e185ecae3f7 100644 --- a/compiler-r

<    44   45   46   47   48   49   50   51   52   53   >