[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-07-05 Thread Nikita Popov via cfe-commits
nikic wrote: Did you check whether this has any compile-time impact? https://github.com/llvm/llvm-project/pull/91101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][Driver] Implement `-mbranch-protection=pauthabi` option (PR #97237)

2024-07-05 Thread Daniil Kovalev via cfe-commits
@@ -1537,11 +1570,16 @@ static void CollectARMPACBTIOptions(const ToolChain &TC, const ArgList &Args, if (!isAArch64 && PBP.Key == "b_key") D.Diag(diag::warn_unsupported_branch_protection) << "b-key" << A->getAsString(Args); +if (!isAArch64 && PBP.HasPa

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-07-05 Thread Michael Buch via cfe-commits
Michael137 wrote: Had to adjust `isEmptyFieldForLayout`/`isEmptyRecordForLayout` because `isEmptyField`/`isEmptyRecord` would call each other recursively, so dispatching from `isEmptyFieldForLayout` wouldn't have been correct (since the `isEmptyField`/`isEmptyRecord` have extra checks for unna

[clang] [llvm] [PAC][Driver] Implement `-mbranch-protection=pauthabi` option (PR #97237)

2024-07-05 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/97237 >From 3b4b1b1739b810d758e68f30c48b648963cff740 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 1 Jul 2024 00:50:21 +0300 Subject: [PATCH 1/5] [PAC][Driver] Implement `-mbranch-protection=pauthabi` opti

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/97824 Previously this took a reference to a map and returned a bool to say whether it succeeded. This is an optional but with more steps. The only reason to keep it that way was if someone was appending to an ex

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang-driver Author: David Spickett (DavidSpickett) Changes Previously this took a reference to a map and returned a bool to say whether it succeeded. This is an optional but with more steps. The only reason to keep it

[clang] d4216b5 - [clang][CodeGen][AMDGPU] Enable AMDGPU `printf` for `spirv64-amd-amdhsa` (#97132)

2024-07-05 Thread via cfe-commits
Author: Alex Voicu Date: 2024-07-05T14:08:07+01:00 New Revision: d4216b5d0b111879f153c53caecf8ea011296cec URL: https://github.com/llvm/llvm-project/commit/d4216b5d0b111879f153c53caecf8ea011296cec DIFF: https://github.com/llvm/llvm-project/commit/d4216b5d0b111879f153c53caecf8ea011296cec.diff LO

[clang] [llvm] [clang][CodeGen][AMDGPU] Enable AMDGPU `printf` for `spirv64-amd-amdhsa` (PR #97132)

2024-07-05 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/97132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix crash in Sema::FindInstantiatedDecl (PR #96509)

2024-07-05 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/96509 From 96b0c2c18c197a1ce03d31b01c14d1b18348e9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Thu, 1 Jun 2023 16:30:54 +0200 Subject: [PATCH 1/2] [Se

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-05 Thread via cfe-commits
@@ -384,39 +386,47 @@ def CXX11Compat : DiagGroup<"c++11-compat", CXXPre14Compat, CXXPre17Compat, CXXPre20Compat, - CXXPre23Compat]>; +

[clang] [llvm] [clang][CodeGen][AMDGPU] Enable AMDGPU `printf` for `spirv64-amd-amdhsa` (PR #97132)

2024-07-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux` running on `ppc64le-sanitizer` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/839 Here is the relevant piece of the

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread Tomas Matheson via cfe-commits
@@ -15,22 +15,23 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/Host.h" +#include + using namespace llvm; int main(int argc, char **argv) { #if defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64__) || defined(_M_X64) - StringMap featu

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen][AMDGPU] Enable AMDGPU `printf` for `spirv64-amd-amdhsa` (PR #97132)

2024-07-05 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux` > running on `ppc64le-sanitizer` while building `clang,llvm` at step 2 > "annotate". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/72/builds/839 > > Here is the rele

[clang] [Sema] Fix crash in Sema::FindInstantiatedDecl (PR #96509)

2024-07-05 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -6300,7 +6300,7 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, getTrivialTemplateArgumentLoc(UnpackedArg, QualType(), Loc)); } QualType T = CheckTemplateIdType(TemplateName(TD), Loc, Args); - if (T.i

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread Phoebe Wang via cfe-commits
@@ -1710,15 +1710,17 @@ VendorSignatures getVendorSignature(unsigned *MaxLeaf) { #if defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64__) || defined(_M_X64) -bool sys::getHostCPUFeatures(StringMap &Features) { +std::optional> sys::getHostCPUFeatures() { unsign

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-07-05 Thread Nikita Popov via cfe-commits
@@ -1352,18 +1352,42 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, auto &Context = CalledFunction->getContext(); // Collect valid attributes for all params. - SmallVector ValidParamAttrs; + SmallVector ValidObjParamAttrs, ValidExactParamAttrs; bool

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-07-05 Thread Nikita Popov via cfe-commits
@@ -1381,21 +1405,58 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { // Check if the underlying value for the parameter is an argumen

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-07-05 Thread Nikita Popov via cfe-commits
@@ -1381,21 +1405,58 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { // Check if the underlying value for the parameter is an argumen

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-07-05 Thread Nikita Popov via cfe-commits
@@ -1381,21 +1405,58 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { // Check if the underlying value for the parameter is an argumen

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-07-05 Thread Nikita Popov via cfe-commits
@@ -1352,18 +1352,42 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, auto &Context = CalledFunction->getContext(); // Collect valid attributes for all params. - SmallVector ValidParamAttrs; + SmallVector ValidObjParamAttrs, ValidExactParamAttrs; bool

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-05 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm created https://github.com/llvm/llvm-project/pull/97827 In a multilib setting, if you compile with a command line such as `clang --target=aarch64-none-elf -march=armv8.9-a+rcpc3`, `getAArch64MultilibFlags` returns an ill-formed string containing two consecutive `

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Simon Tatham (statham-arm) Changes In a multilib setting, if you compile with a command line such as `clang --target=aarch64-none-elf -march=armv8.9-a+rcpc3`, `getAArch64MultilibFlags` returns an ill-formed string containing two co

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-05 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 18b575d4aac603b6acd3fa0d639fbc79cd4f0ac3 8b39cbbdbe3646062dd1cdb60eab18339f9ca490 --

[clang] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags (PR #97827)

2024-07-05 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/97827 >From 81d77bf87dd47684683492ab70cc45ab6eb4364e Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 5 Jul 2024 11:57:19 +0100 Subject: [PATCH] [Clang][Driver] Skip empty strings in getAArch64MultilibFlags

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
@@ -1710,15 +1710,17 @@ VendorSignatures getVendorSignature(unsigned *MaxLeaf) { #if defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64__) || defined(_M_X64) -bool sys::getHostCPUFeatures(StringMap &Features) { +std::optional> sys::getHostCPUFeatures() { unsign

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ae0d224 - [BPF] Fix linking issues in static map initializers (#91310)

2024-07-05 Thread via cfe-commits
Author: Nick Zavaritsky Date: 2024-07-05T07:32:09-07:00 New Revision: ae0d2244a23567c8d9863e63b338d34c31416a7b URL: https://github.com/llvm/llvm-project/commit/ae0d2244a23567c8d9863e63b338d34c31416a7b DIFF: https://github.com/llvm/llvm-project/commit/ae0d2244a23567c8d9863e63b338d34c31416a7b.dif

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-07-05 Thread via cfe-commits
https://github.com/yonghong-song closed https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-07-05 Thread via cfe-commits
github-actions[bot] wrote: @mejedi Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/97824 >From 7ebe4e487b763ff26fbab6d75aa7c8694d63e8b1 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 5 Jul 2024 08:42:22 + Subject: [PATCH 1/2] [llvm][TargetParser] Return optional from getHostCPUFe

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
@@ -15,22 +15,23 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/Host.h" +#include + using namespace llvm; int main(int argc, char **argv) { #if defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64__) || defined(_M_X64) - StringMap featu

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread via cfe-commits
EugeneZelenko wrote: Please mention changes in Release Notes. https://github.com/llvm/llvm-project/pull/97767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][RISCV] Improve the tests for --print-enabled-extensions and --print-supported-extensions (PR #97829)

2024-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Tomas Matheson (tmatheson-arm) Changes For AArch64, we have existing tests for `--print-enabled-extensions` for each architecture. However: - These are added to the end of the existing tests which check for `"-target-feature"`, w

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/3] Allow unnecessary-value-param to match

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-05 Thread via cfe-commits
@@ -0,0 +1,36 @@ +//===--- UseRangesCheck.h - clang-tidy --*- C++ -*-===// +// +// 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-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

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

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

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

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-05 Thread via cfe-commits
@@ -131,6 +131,12 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`boost-use-ranges + ` check. + + Detects calls to standard library iterator algorithms that could be replaced + with a boost ranges version instead EugeneZelenko wrote: Missi

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-07-05 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Ping: would be glad to see feedback on the changes from those who are interested. https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,92 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle approved this pull request. https://github.com/llvm/llvm-project/pull/97767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-07-05 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Ping: would be glad to see feedback on the changes from those who are interested. https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread via cfe-commits
@@ -483,6 +483,12 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`unnecessary-value-param + ` check + detecting more cases fo

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread via cfe-commits
@@ -483,6 +483,12 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`unnecessary-value-param + ` check + detecting more cases fo

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/4] Allow unnecessary-value-param to match

[clang-tools-extra] [llvm] [clang-doc] fix bug introduced by asset test (PR #97540)

2024-07-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/97540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
@@ -483,6 +483,12 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`unnecessary-value-param + ` check + detecting more cases fo

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
@@ -483,6 +483,12 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`unnecessary-value-param + ` check + detecting more cases fo

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-07-05 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/96422 >From 7fb44b1cd3ffac0a0f509cefa3a141dac50da142 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 21 Jun 2024 12:15:07 +0100 Subject: [PATCH 1/8] [clang][CGRecordLayout] Remove dependency on isZeroSize Th

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-05 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/97764 >From 98746ac4cb477b44280de471113138e706147242 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 2 Jul 2024 14:25:44 +0100 Subject: [PATCH 1/2] Add a modernize-use-ranges check --- .../clang-tidy/moderniz

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread Tomas Matheson via cfe-commits
@@ -22,13 +22,13 @@ using namespace llvm; int main(int argc, char **argv) { #if defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64__) || defined(_M_X64) - if (std::optional> features = + if (const std::optional> features = sys::getHostCPUFeatures(featu

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-05 Thread Nathan James via cfe-commits
@@ -0,0 +1,36 @@ +//===--- UseRangesCheck.h - clang-tidy --*- C++ -*-===// +// +// 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] [llvm] [AArch64][RISCV] Improve the tests for --print-enabled-extensions and --print-supported-extensions (PR #97829)

2024-07-05 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/97829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
@@ -22,13 +22,13 @@ using namespace llvm; int main(int argc, char **argv) { #if defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64__) || defined(_M_X64) - if (std::optional> features = + if (const std::optional> features = sys::getHostCPUFeatures(featu

[clang] [clang][deps] Don't treat ObjC method args as module directives (PR #97654)

2024-07-05 Thread Argyrios Kyrtzidis via cfe-commits
akyrtzi wrote: Could you test the change with a unit test in `DependencyDirectivesScannerTest.cpp` instead? It would be orders of magnitude more lightweight, execution wise, than a whole new lit test. https://github.com/llvm/llvm-project/pull/97654 _

[clang-tools-extra] Add checks to convert std library iterator algorithms into c++20 or boost ranges (PR #97764)

2024-07-05 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/97764 >From 86b21ee28d1b6efb5d5b4da97cb09a484337a92f Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 2 Jul 2024 14:25:44 +0100 Subject: [PATCH 1/2] Add a modernize-use-ranges check --- .../clang-tidy/moderniz

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/97824 >From 7ebe4e487b763ff26fbab6d75aa7c8694d63e8b1 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 5 Jul 2024 08:42:22 + Subject: [PATCH 1/3] [llvm][TargetParser] Return optional from getHostCPUFe

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread David Spickett via cfe-commits
@@ -22,13 +22,13 @@ using namespace llvm; int main(int argc, char **argv) { #if defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64__) || defined(_M_X64) - if (std::optional> features = + if (const std::optional> features = sys::getHostCPUFeatures(featu

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-05 Thread via cfe-commits
memory-thrasher wrote: Oh looks like that new unit test is getting run. The test execution gave me the command to run them. Working on it now. https://github.com/llvm/llvm-project/pull/97792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [AArch64][RISCV] Improve the tests for --print-enabled-extensions and --print-supported-extensions (PR #97829)

2024-07-05 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. Large diff! LGTM, although obvs haven't read every line :) https://github.com/llvm/llvm-project/pull/97829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-05 Thread Saleem Abdulrasool via cfe-commits
@@ -365,7 +365,12 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, // Return address is address after call site instruction, so setting IP to // that does simulates a return. - newRegisters.setIP(returnAddress); + // + // In case

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-05 Thread via cfe-commits
@@ -3183,8 +3193,35 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { DiagID = diag::ext_no_newline_eof; } -Diag(BufferEnd, DiagID) - << FixItHint::CreateInsertion(EndLoc, "\n"); +if (LastNewline.empty()) { + Diag(BufferEnd, DiagID)

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

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

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-05 Thread via cfe-commits
@@ -3183,8 +3193,35 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { DiagID = diag::ext_no_newline_eof; } -Diag(BufferEnd, DiagID) - << FixItHint::CreateInsertion(EndLoc, "\n"); +if (LastNewline.empty()) { + Diag(BufferEnd, DiagID)

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

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

[clang] [RFC] [clang][Toolchain] Treat "pc"/"unknown" vendor interchangeable (PR #97802)

2024-07-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: How is Rust built? If the system compiler-rt libraries are installed to `/usr/lib/llvm-18/lib/clang/18/lib/x86_64-pc-linux-gnu`, which means that `LLVM_DEFAULT_TARGET_TRIPLE=x86_64-pc-linux-gnu`, the Rust build should also use x86_64-pc-linux-gnu. If we don't consider Rust, Cla

[clang] [RFC] [clang][Toolchain] Treat "pc"/"unknown" vendor interchangeable (PR #97802)

2024-07-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. . https://github.com/llvm/llvm-project/pull/97802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][ELF][AArch64] Encode signed GOT flag in PAuth core info (PR #96159)

2024-07-05 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. LGTM, just based on what I can see from implementation of the existing bits in the version field. https://github.com/llvm/llvm-project/pull/96159 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-05 Thread Mital Ashok via cfe-commits
@@ -3183,8 +3193,35 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { DiagID = diag::ext_no_newline_eof; } -Diag(BufferEnd, DiagID) - << FixItHint::CreateInsertion(EndLoc, "\n"); +if (LastNewline.empty()) { + Diag(BufferEnd, DiagID)

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-05 Thread via cfe-commits
@@ -3183,8 +3193,35 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { DiagID = diag::ext_no_newline_eof; } -Diag(BufferEnd, DiagID) - << FixItHint::CreateInsertion(EndLoc, "\n"); +if (LastNewline.empty()) { + Diag(BufferEnd, DiagID)

[clang] [Clang] Warn on backslash-newline-EOF (PR #97585)

2024-07-05 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/97585 >From 8af656659b79d76c971b01f1f4c14dc7315565b8 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Fri, 21 Jun 2024 18:55:38 +0100 Subject: [PATCH 1/9] [Clang] Warn on backslash-newline-EOF --- clang/docs/Relea

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-07-05 Thread Ben Boeckel via cfe-commits
@@ -652,6 +652,141 @@ in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is: comes, the term BMI will refer to the Reduced BMI and the Full BMI will only be meaningful to build systems which elect to support two-phase compilation. +Experimental No Tra

[clang] [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (PR #97733)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97733 >From f009148063ba41d39fc844f4432ceb51377f381c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 4 Jul 2024 17:05:11 +0300 Subject: [PATCH 1/5] [clang] Implement P3144R2 "Deleting a Pointer to an Inco

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-05 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh created https://github.com/llvm/llvm-project/pull/97846 Set `static` storage class specifier for such decls to have `internal` linkage in produced IR and then in the object file. Fix #97830 >From ec1f0f0fe626db9da1437ed414f8d080c750cb45 Mon Sep 17 00:00:00 2001 Fro

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-05 Thread via cfe-commits
https://github.com/memory-thrasher updated https://github.com/llvm/llvm-project/pull/97792 >From 533d1577d04477ec4ec0c7ce16e06aaa36064dd3 Mon Sep 17 00:00:00 2001 From: Sidney Kelley Date: Thu, 4 Jul 2024 23:03:16 -0700 Subject: [PATCH] Adds an arbitrary pseudonym to clang"s windows mangler to

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-05 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/97846 >From ec1f0f0fe626db9da1437ed414f8d080c750cb45 Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 5 Jul 2024 20:40:32 +0300 Subject: [PATCH] [clang] Use internal linkage for c23 constexpr vars. Set `st

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dmitriy Chestnykh (chestnykh) Changes Set `static` storage class specifier for such decls to have `internal` linkage in produced IR and then in the object file. Fix #97830 --- Full diff: https://github.com/llvm/llvm-project/pull/97846.dif

[clang] [llvm] [SanitizerBinaryMetadata] Fix multi-version sanitizer metadata (PR #97848)

2024-07-05 Thread Marco Elver via cfe-commits
https://github.com/melver created https://github.com/llvm/llvm-project/pull/97848 It should be valid to combine TUs that have different versions of sanitizer metadata. However, this had not been possible due to giving sanitizer metadata sections, constructors, and destructors (that call callba

[clang] [llvm] [SanitizerBinaryMetadata] Fix multi-version sanitizer metadata (PR #97848)

2024-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-clang @llvm/pr-subscribers-compiler-rt-sanitizer Author: Marco Elver (melver) Changes It should be valid to combine TUs that have different versions of sanitizer metadata. However, this had not been possible due to g

[clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread Alex Langford via cfe-commits
https://github.com/bulbazord commented: >From an API standpoint, there doesn't actually seem to be a huge difference >between an empty StringMap and an optional with an empty string map in it >right? Why not return a map every time? https://github.com/llvm/llvm-project/pull/97824 _

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-05 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/97846 >From 20adb1c05dc59cc0a4b3969824f75c2d9c612755 Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 5 Jul 2024 20:40:32 +0300 Subject: [PATCH] [clang] Use internal linkage for c23 constexpr vars. Set `st

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-05 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/97846 >From 20adb1c05dc59cc0a4b3969824f75c2d9c612755 Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 5 Jul 2024 20:40:32 +0300 Subject: [PATCH] [clang] Use internal linkage for c23 constexpr vars. Set `st

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-05 Thread Azat Khuzhin via cfe-commits
@@ -365,7 +365,12 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, // Return address is address after call site instruction, so setting IP to // that does simulates a return. - newRegisters.setIP(returnAddress); + // + // In case

[clang] [RFC] [clang][Toolchain] Treat "pc"/"unknown" vendor interchangeable (PR #97802)

2024-07-05 Thread Azat Khuzhin via cfe-commits
azat wrote: >How is Rust built? If the system compiler-rt libraries are installed to >/usr/lib/llvm-18/lib/clang/18/lib/x86_64-pc-linux-gnu, which means that >LLVM_DEFAULT_TARGET_TRIPLE=x86_64-pc-linux-gnu, the Rust build should also use >x86_64-pc-linux-gnu. The problem is not only with Rust

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-05 Thread via cfe-commits
https://github.com/memory-thrasher updated https://github.com/llvm/llvm-project/pull/97792 >From b5a18e011ccb12b2cdde4456fd0ecdc7956e71ac Mon Sep 17 00:00:00 2001 From: Sidney Kelley Date: Thu, 4 Jul 2024 23:03:16 -0700 Subject: [PATCH] Adds an arbitrary pseudonym to clang"s windows mangler to

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-05 Thread via cfe-commits
memory-thrasher wrote: now the name of the symbol that is being passed is included in the mangle so different value's opte pointers do not collide. Fallback to empty. https://github.com/llvm/llvm-project/pull/97792 ___ cfe-commits mailing list cfe-com

[clang] 788731c - [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (#97733)

2024-07-05 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-07-05T22:27:04+04:00 New Revision: 788731cdbd732180639988c9589adbe63bb28afa URL: https://github.com/llvm/llvm-project/commit/788731cdbd732180639988c9589adbe63bb28afa DIFF: https://github.com/llvm/llvm-project/commit/788731cdbd732180639988c9589adbe63bb28afa.

[clang] [clang] Implement P3144R2 "Deleting a Pointer to an Incomplete Type..." (PR #97733)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/97733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-05 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/97846 >From ecf8360b1ca201eeb8887214477eb8ffeb5f088f Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 5 Jul 2024 20:40:32 +0300 Subject: [PATCH] [clang] Use internal linkage for c23 constexpr vars. Set `st

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-05 Thread via cfe-commits
memory-thrasher wrote: @bolshakov-a @eefriedman @zygoloid hoping yall are the right reviewers to tag? https://github.com/llvm/llvm-project/pull/97792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-05 Thread John McCall via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + auto *Base = Result.Val.getLValueBase().get(); + if (auto *Decl = dyn_cast_or_null(Base

[clang] [flang] [llvm] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2024-07-05 Thread Hongtao Yu via cfe-commits
htyu wrote: > @karthik-man LLVM _always_ requires a correct data layout. Yes, that includes > InstCombine. What sort of correct data layout should be used if we are optimization machine-independently? Like cross-compilation with `Clang -O3 -emit-llvm` , but optimized the generated IR for diff

[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-07-05 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: > I assume that @benlangmuir added the scanner unit-test to demonstrate the > current behavior instead of trying to make sure it's preserved. Correct. They're only interesting to the scanner insofar as they're used in `_Pragma()` as far as I know. If we can handle them, gre

[clang] [Clang] Fix parsing of reversible type traits in template arguments (PR #95969)

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Stumbled upon a related bug #29631 https://github.com/llvm/llvm-project/pull/95969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2024-07-05 Thread Nikita Popov via cfe-commits
nikic wrote: @htyu LLVM does not support this. Support for doing that was officially removed about ten years ago when data layout became mandatory, but even prior to that IR was already target-specific, e.g. due to target-specific ABI. I think some parts of MLIR may support this, but certainly

<    1   2   3   >