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

2024-07-06 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh ready_for_review https://github.com/llvm/llvm-project/pull/97846 ___ 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-06 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/97846 >From 70a5e96c9489ef46c5c17106178bf703eab8f8ad 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

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

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

[clang] 9cb9a97 - [CMake] Use Clang to infer the target triple (#89425)

2024-07-05 Thread via cfe-commits
Author: Petr Hosek Date: 2024-07-05T22:56:15-07:00 New Revision: 9cb9a97e44130e17e96f994c3e594aba69ea1ad5 URL: https://github.com/llvm/llvm-project/commit/9cb9a97e44130e17e96f994c3e594aba69ea1ad5 DIFF: https://github.com/llvm/llvm-project/commit/9cb9a97e44130e17e96f994c3e594aba69ea1ad5.diff

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-07-05 Thread Petr Hosek via cfe-commits
petrhosek wrote: > > @wzssyqa Is it OK with you if I go ahead and merge this PR? I plan to > > follow up with further improvements but this is necessary to fix the build > > of LLVM runtime libraries in the bootstrapping build. > > Is there a filed issue linked to this? I filed #97876 and

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-07-05 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek updated https://github.com/llvm/llvm-project/pull/89425 >From eb2459876526b78c97b04801dd07bd53540b2892 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Tue, 15 Feb 2022 22:59:58 -0800 Subject: [PATCH 1/3] [CMake] Use Clang to infer the target triple When using

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

2024-07-05 Thread via cfe-commits
goldsteinn wrote: > High level question: Are all of these really useful? > > For parameter attributes, there are really two types, ones that are used to > reason about calls, and ones used to reason about function definitions. I > think the split here is something like: > > *

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

2024-07-05 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/91101 >From 6e4e40fadccbfcd11ad85f2042bd46919e1fb273 Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Sat, 4 May 2024 18:12:34 -0500 Subject: [PATCH 1/3] [Inliner] Add tests for propagating more parameter

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-05 Thread Max Winkler via cfe-commits
@@ -598,7 +599,9 @@ class CXXRecordDecl : public RecordDecl { return !hasDefinition() || !isDynamicClass() || hasAnyDependentBases(); } - void setIsParsingBaseSpecifiers() { data().IsParsingBaseSpecifiers = true; } + void setIsParsingBaseSpecifiers(bool to = true) {

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-07-05 Thread Kefu Chai via cfe-commits
tchaikov wrote: @5chmidti @PiotrZSL Hi Julian and Piotr, I hope this message finds you well. I'm following up on my previous comment regarding the PR I submitted two weeks ago. I understand you both might be busy, but I wanted to check if there's been any progress or if we are expecting more

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

2024-07-05 Thread via cfe-commits
goldsteinn wrote: > Did you check whether this has any compile-time impact? https://llvm-compile-time-tracker.com/compare.php?from=683c8e9913cd87e0b2a8e083298cd3ebc67923fe=d28142d0bc50a638469069bbe8a59380ae88ca8e=instructions%3Au Seems on the cusp of minimal/negligible.

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

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

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

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97806 >From b855fe1b301a156ea45caa4b6fd6eca1c69d5cf5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Jul 2024 12:39:13 +0300 Subject: [PATCH 1/2] [clang] Add C++26 diagnostics to compatibility diagnosic

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

2024-07-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97806 >From b855fe1b301a156ea45caa4b6fd6eca1c69d5cf5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Jul 2024 12:39:13 +0300 Subject: [PATCH] [clang] Add C++26 diagnostics to compatibility diagnosic

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

2024-07-05 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @memory-thrasher Godbolt for reference: https://godbolt.org/z/b9v8KhPET I don't follow that MSVC 1920+ does not support this mangling properly. It appears that it does. I haven't dug too deep into the C++20 MSVC mangling for NTTP yet but it does appear MSVC does support this

[clang] [RISCV] Handle empty structs/unions passing in C++ (PR #97315)

2024-07-05 Thread Sudharsan Veeravalli via cfe-commits
svs-quic wrote: > The current spec language is: > > > Empty structs or union arguments or return values are ignored by C > > compilers which support them as a non-standard extension. This is not the > > case for C++, which requires them to be sized types. > > So empty structs in C are

[clang] [RISCV] Handle empty structs/unions passing in C++ (PR #97315)

2024-07-05 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic updated https://github.com/llvm/llvm-project/pull/97315 >From 3c744fe6111f0b6d24356a584f94c6d1cb273f7a Mon Sep 17 00:00:00 2001 From: Sudharsan Veeravalli Date: Mon, 1 Jul 2024 21:58:37 +0530 Subject: [PATCH 1/3] [RISCV] Handle empty structs/unions passing in C++

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-07-05 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Can you add some tests to demonstrate that this patch will enable more optimizations in some real-world applications? https://github.com/llvm/llvm-project/pull/97762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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,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:

[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,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:

[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,68 @@ +//===--- 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:

[clang] [hexagon] Add {con, de}structive interference size defn (PR #94877)

2024-07-05 Thread Brian Cain via cfe-commits
https://github.com/androm3da ready_for_review https://github.com/llvm/llvm-project/pull/94877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-07-05 Thread Yingwei Zheng via cfe-commits
@@ -1549,30 +1549,10 @@ define amdgpu_kernel void @multiple_uses_fneg_select_f64(double %x, double %y, i define amdgpu_kernel void @fnge_select_f32_multi_use_regression(float %.i2369) { ; GCN-LABEL: fnge_select_f32_multi_use_regression: ; GCN: ; %bb.0: ; %.entry -;

[clang] [hexagon] Add {con, de}structive interference size defn (PR #94877)

2024-07-05 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/94877 >From ffccfde9f5892520f499b6cfc12ba824aafe5fbd Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Sat, 8 Jun 2024 16:25:11 -0700 Subject: [PATCH] [hexagon] Add {con,de}structive interference size defn This

[clang] [clang][X86] Add __cpuidex function to cpuid.h (PR #97785)

2024-07-05 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > Thanks - I think this is fine with me. In > https://github.com/mingw-w64/mingw-w64/commit/a4c0c1d00d140d69a2c72f6ca0d49c91bdb2b08c > we adjusted the mingw-w64 headers in anticipation that this gets merged in > Clang 19, so it'd be good to have it settled before the

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-07-05 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna approved this pull request. LGTM. Let me know if you need me to merge this change. https://github.com/llvm/llvm-project/pull/95455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-05 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97103 >From c784272b3f66ca06be4ab8e72a0963e5ebb6a869 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 28 Jun 2024 12:40:56 -0700 Subject: [PATCH 01/12] update tests, update code ---

[clang] [FMV][AArch64] Do not emit ifunc resolver on use. (PR #97761)

2024-07-05 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/97761 ___ 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 Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. 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] [llvm] [AArch64][RISCV] Improve the tests for --print-enabled-extensions and --print-supported-extensions (PR #97829)

2024-07-05 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,24 @@ +// REQUIRES: aarch64-registered-target jroelofs wrote: these should probably all go in an `aarch64` folder with a `lit.local.cfg`: ``` targets = set(config.root.targets_to_build.split()) if not "AArch64" in targets: config.unsupported =

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

2024-07-05 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > The new tests are autogenerated, but I am not merging the script that creates > them because there isn't a good place for it. Mind sticking it in a gist at least so folks can use it for downstream subtargets? https://github.com/llvm/llvm-project/pull/97829

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

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

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

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

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

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

[clang] [Clang] Access tls_guard via llvm.threadlocal.address (PR #96633)

2024-07-05 Thread John McCall via cfe-commits
@@ -1070,13 +1084,20 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, // Mark as initialized before initializing anything else. If the // initializers use previously-initialized thread_local vars, that's // probably supposed to be OK, but

[clang] [RISCV] Handle empty structs/unions passing in C++ (PR #97315)

2024-07-05 Thread Craig Topper via cfe-commits
topperc wrote: > The current spec language is: > > > Empty structs or union arguments or return values are ignored by C > > compilers which support them as a non-standard extension. This is not the > > case for C++, which requires them to be sized types. > > So empty structs in C are

[clang] [clang-format] Skip block commented out includes when sorting them (PR #97787)

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

[clang] ceade83 - [clang-format] Skip block commented out includes when sorting them (#97787)

2024-07-05 Thread via cfe-commits
Author: Owen Pan Date: 2024-07-05T15:28:16-07:00 New Revision: ceade83ad5fc529f2b2beb896eec0dd0b29fdd44 URL: https://github.com/llvm/llvm-project/commit/ceade83ad5fc529f2b2beb896eec0dd0b29fdd44 DIFF: https://github.com/llvm/llvm-project/commit/ceade83ad5fc529f2b2beb896eec0dd0b29fdd44.diff

[clang] [RISCV] Handle empty structs/unions passing in C++ (PR #97315)

2024-07-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The current spec language is: > Empty structs or union arguments or return values are ignored by C compilers > which support them as a non-standard extension. This is not the case for C++, > which requires them to be sized types. So empty structs in C are ignored, empty

[clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [BOLT][BAT] Add support for three-way split functions (PR #93760)

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

[clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [BOLT][BAT] Add support for three-way split functions (PR #93760)

2024-07-05 Thread Davide Italiano via cfe-commits
https://github.com/dcci approved this pull request. https://github.com/llvm/llvm-project/pull/93760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][X86] Add __cpuidex function to cpuid.h (PR #97785)

2024-07-05 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Thanks - I think this is fine with me. In https://github.com/mingw-w64/mingw-w64/commit/a4c0c1d00d140d69a2c72f6ca0d49c91bdb2b08c we adjusted the mingw-w64 headers in anticipation that this gets merged in Clang 19, so it'd be good to have it settled before the 19.x branch gets

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

2024-07-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,93 @@ +// 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) { + //

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2024-07-05 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/96417 >From f90e3124f2878f67e12c7ba85ebe20d8655ef0e2 Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 23 Jun 2024 00:07:19 -0400 Subject: [PATCH] Support --sysroot= for ${arch}-windows-msvc targets I think it is

[clang] [Clang] prevent checking destructor reference with an invalid initializer (PR #97860)

2024-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #97230 --- Full diff: https://github.com/llvm/llvm-project/pull/97860.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/lib/Sema/SemaInit.cpp (+3) -

[clang] [Clang] prevent checking destructor reference with an invalid initializer (PR #97860)

2024-07-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/97860 Fixes #97230 >From cb3c677c9eb10998ed7357cdde2722f3b3c1c847 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 6 Jul 2024 00:24:06 +0300 Subject: [PATCH] [Clang] prevent checking destructor reference with

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2024-07-05 Thread via cfe-commits
trcrsired wrote: > > I extract all files from msvc installations and windows SDK and put them in > > the format of what a normal sysroot would do on other platforms. Basically, > > unify the behavior with another platform. > > Isn't it better to point Clang at MSVC and the Windows SDK as

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

2024-07-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,181 @@ +//===--- 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:

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

2024-07-05 Thread Julian Schmidt 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:

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

2024-07-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,68 @@ +//===--- 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:

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

2024-07-05 Thread Julian Schmidt via cfe-commits
@@ -26,6 +26,7 @@ add_clang_library(clangTidyUtils TransformerClangTidyCheck.cpp TypeTraits.cpp UsingInserter.cpp + UseRangesCheck.cpp 5chmidti wrote: Please fix the ordering for these two files https://github.com/llvm/llvm-project/pull/97764

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

2024-07-05 Thread Julian Schmidt 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:

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

2024-07-05 Thread Julian Schmidt 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:

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

2024-07-05 Thread Julian Schmidt 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:

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

2024-07-05 Thread Julian Schmidt 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:

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

2024-07-05 Thread Julian Schmidt 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:

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

2024-07-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,181 @@ +//===--- 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:

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

2024-07-05 Thread Julian Schmidt 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:

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

2024-07-05 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,181 @@ +//===--- 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:

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

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

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

2024-07-05 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: This will be great to have. It should be possible to add support for template function decls in a follow-up. Maybe this should be documented to avoid confusion? https://github.com/llvm/llvm-project/pull/97764

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

2024-07-05 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Thanks @tmatheson-arm! I'll merge this as soon as #96478 gets merged - there, we introduce `AARCH64_PAUTH_PLATFORM_LLVM_LINUX_VERSION_INITFINIADDRDISC = 7`, so signed GOT should be bit 8. We can't use bit 8 for signed GOT right now since the implementation relies on contiguous

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-05 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97103 >From c784272b3f66ca06be4ab8e72a0963e5ebb6a869 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 28 Jun 2024 12:40:56 -0700 Subject: [PATCH 01/11] update tests, update code ---

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-07-05 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/97762 >From c2913d1074c5bfa771379d68e9ba728a3d1d1ce5 Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Mon, 1 Jul 2024 17:06:56 + Subject: [PATCH 1/4] [ValueTracking] use KnownBits to compute fpclass from

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

2024-07-05 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/97654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-05 Thread Nikita Popov via cfe-commits
nikic wrote: High level question: Are all of these really useful? For parameter attributes, there are really two types, ones that are used to reason about calls, and ones used to reason about function definitions. I think the split here is something like: * readonly/readnone: Mostly used

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

2024-07-05 Thread via cfe-commits
https://github.com/goldsteinn edited 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] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-07-05 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/91101 >From 6e4e40fadccbfcd11ad85f2042bd46919e1fb273 Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Sat, 4 May 2024 18:12:34 -0500 Subject: [PATCH 1/3] [Inliner] Add tests for propagating more parameter

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

2024-07-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `clang-tools-extra,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at:

[clang] [HLSL] Set default DwarfVersion to 4 for HLSL. (PR #97854)

2024-07-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Xiang Li (python3kgae) Changes Set default DwarfVersion to 4 for HLSL to match DXIL which does not support DwarfVersion 5. Based on https://registry.khronos.org/SPIR-V/specs/unified1/DebugInfo.html SPIRV is currently using Dwarf4 as

[clang] [HLSL] Set default DwarfVersion to 4 for HLSL. (PR #97854)

2024-07-05 Thread Xiang Li via cfe-commits
https://github.com/python3kgae created https://github.com/llvm/llvm-project/pull/97854 Set default DwarfVersion to 4 for HLSL to match DXIL which does not support DwarfVersion 5. Based on https://registry.khronos.org/SPIR-V/specs/unified1/DebugInfo.html SPIRV is currently using Dwarf4 as

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

2024-07-05 Thread Dmitriy Chestnykh via cfe-commits
@@ -4428,10 +4428,14 @@ void Parser::ParseDeclarationSpecifiers( // constexpr, consteval, constinit specifiers case tok::kw_constexpr: - if (getLangOpts().C23) + if (getLangOpts().C23) { Diag(Tok, diag::warn_c23_compat_keyword) << Tok.getName(); -

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

2024-07-05 Thread Thorsten Schütt via cfe-commits
@@ -4428,10 +4428,14 @@ void Parser::ParseDeclarationSpecifiers( // constexpr, consteval, constinit specifiers case tok::kw_constexpr: - if (getLangOpts().C23) + if (getLangOpts().C23) { Diag(Tok, diag::warn_c23_compat_keyword) << Tok.getName(); -

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

2024-07-05 Thread via cfe-commits
@@ -1381,21 +1405,58 @@ static void AddParamAndFnBasicAttributes(const CallBase , 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 argument.

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

2024-07-05 Thread Dmitriy Chestnykh via cfe-commits
https://github.com/chestnykh converted_to_draft https://github.com/llvm/llvm-project/pull/97846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-05 Thread via cfe-commits
https://github.com/PeterChou1 closed 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] 1ed84a8 - [clang-doc] fix bug introduced by asset test (#97540)

2024-07-05 Thread via cfe-commits
Author: PeterChou1 Date: 2024-07-05T15:27:25-04:00 New Revision: 1ed84a862f9ce3c60251968f23a5405f06458975 URL: https://github.com/llvm/llvm-project/commit/1ed84a862f9ce3c60251968f23a5405f06458975 DIFF: https://github.com/llvm/llvm-project/commit/1ed84a862f9ce3c60251968f23a5405f06458975.diff

[clang] [clang] inherit GD to let the codegen add kcfi type for ifunc (PR #96400)

2024-07-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Oh, hmm, I see. Maybe the right strategy here is to delay attaching the resolver to the ifunc until the end of the translation unit, when we know the definition is already emitted. That way, it should already have the right attributes. (We already do some delayed

[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

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

[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

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

[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

[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

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

[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

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

[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 , 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 of this is

[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

[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

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

[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

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

[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

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

<    4   5   6   7   8   9   10   11   12   13   >