[llvm] [clang] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM module stylistic comments. https://github.com/llvm/llvm-project/pull/74970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [llvm] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Kazu Hirata via cfe-commits
@@ -31,31 +31,45 @@ using LoadStorePair = std::pair; /// Instrumentation based profiling lowering pass. This pass lowers /// the profile instrumented code generated by FE or the IR based /// instrumentation pass. -class InstrProfiling : public PassInfoMixin { +class InstrProfil

[clang] [llvm] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata edited https://github.com/llvm/llvm-project/pull/74970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Kazu Hirata via cfe-commits
@@ -31,31 +31,45 @@ using LoadStorePair = std::pair; /// Instrumentation based profiling lowering pass. This pass lowers /// the profile instrumented code generated by FE or the IR based /// instrumentation pass. -class InstrProfiling : public PassInfoMixin { +class InstrProfil

[clang] [llvm] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Kazu Hirata via cfe-commits
@@ -31,31 +31,45 @@ using LoadStorePair = std::pair; /// Instrumentation based profiling lowering pass. This pass lowers /// the profile instrumented code generated by FE or the IR based /// instrumentation pass. -class InstrProfiling : public PassInfoMixin { +class InstrProfil

[clang] [Cygwin] Cygwin driver (PR #74933)

2023-12-10 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng updated https://github.com/llvm/llvm-project/pull/74933 From daa6702f698724655b91c4fa52272c09924d2d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=81=E6=81=92=20Xu=20Chiheng?= Date: Sat, 9 Dec 2023 21:51:29 +0800 Subject: [PATCH 1/6] 1 --- clang/lib/

[clang] [Cygwin] Reduced number of inline elements of CallArgList. (PR #74977)

2023-12-10 Thread 徐持恒 Xu Chiheng via cfe-commits
xu-chiheng wrote: > Just FYI submitting lots of PRs with all of them having commits with a commit > message of 1 is not going to go anywhere. They need to be revised with proper > meaningful commit messages. This fix bootstraping on Cygwin, using GCC 13.2.0 as stage 0 compiler. It seems that t

[llvm] [clang] [llvm] Add support for building on illumos (PR #74930)

2023-12-10 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/74930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Initialize HighlightingsBuilder::Resolver (PR #74971)

2023-12-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thank you! LGTM modulo one nit: could you please remove the nullptr member initializer for `Resolver`? That looks unnecessary now. https://github.com/llvm/llvm-project/pull/74971 ___ cfe-commits m

[flang] [clang] [llvm] [Flang][WIP/RFC] Enable TSan for Flang (PR #74643)

2023-12-10 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Hi @jprotze , thank you for working on this! One thing that would be very nice to see are tests :) It would really help if we could see how to use and how to test this. Any chance for an end-to-end PoC or a demonstrator? @kiranchandramohan , would an e2e test with OpenMP en

[clang] [Clang][LoongArch] Comply with the lp64d ABI to pass vector arguments (PR #74990)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yjijd) Changes LoongArch gcc complies with the lp64d calling convention to pass vector arguments currently. This patch makes clang be consistent with gcc. --- Patch is 1.89 MiB, truncated to 20.00 KiB below, full version: https://

[clang] [Clang][LoongArch] Comply with the lp64d ABI to pass vector arguments (PR #74990)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (yjijd) Changes LoongArch gcc complies with the lp64d calling convention to pass vector arguments currently. This patch makes clang be consistent with gcc. --- Patch is 1.89 MiB, truncated to 20.00 KiB below, full version:

[clang] [clang][ASTImporter] delay import funtion return type (PR #74991)

2023-12-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/74991 Import return type of a function would lead infinite recursion when `getAssociatedDecl()` returns itself in `ASTNodeImporter::VisitSubstNonTypeTemplateParmExpr`. Delay import the return type whether it is auto w

[clang] [clang][ASTImporter] delay import funtion return type (PR #74991)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes Import return type of a function would lead infinite recursion when `getAssociatedDecl()` returns itself in `ASTNodeImporter::VisitSubstNonTypeTemplateParmExpr`. Delay import the return type whether it is auto w

[clang] [clang][ASTImporter] skip TemplateTypeParmDecl in VisitTypeAliasTemplateDecl (PR #74919)

2023-12-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/74919 >From e656aa2a3850f845987bb0ddc56b308d22d2dafd Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sat, 9 Dec 2023 12:00:02 +0800 Subject: [PATCH] [clang][ASTImporter] skip TemplateTypeParmDecl in VisitTypeAliasTemplate

[llvm] [clang] [llvm] Add support for building on illumos (PR #74930)

2023-12-10 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/74930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/70621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

2023-12-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/75001 This is a follow-up patch for [D156993](https://reviews.llvm.org/D156993), that marks only the lambda body as non-immediate context. Fixes https://github.com/llvm/llvm-project/issues/71684 >From 8681b3c9f5e19b6

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes This is a follow-up patch for [D156993](https://reviews.llvm.org/D156993), that marks only the lambda body as non-immediate context. Fixes https://github.com/llvm/llvm-project/issues/71684 --- Patch is 20.

[clang] [clang] Correctly implement CWG 2672 (PR #75001)

2023-12-10 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Note I'm not adding an extra release note since the previous implementation has done that and hasn't been cherry-picked or released yet. https://github.com/llvm/llvm-project/pull/75001 ___ cfe-commits mailing list cfe-commits@lists.llvm

[llvm] [libcxx] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/74994 >From 6e26ca239c49e1b7d9ab72217db7339e92df163f Mon Sep 17 00:00:00 2001 From: Zingam Date: Sun, 10 Dec 2023 14:16:02 +0200 Subject: [PATCH 1/2] [libc++][span] P2821R5: span.at() --- libcxx/include/span

[llvm] [clang-tools-extra] [libcxx] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/74994 >From 6e26ca239c49e1b7d9ab72217db7339e92df163f Mon Sep 17 00:00:00 2001 From: Zingam Date: Sun, 10 Dec 2023 14:16:02 +0200 Subject: [PATCH 1/3] [libc++][span] P2821R5: span.at() --- libcxx/include/span

[clang] [llvm] [libcxx] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/74994 >From 6e26ca239c49e1b7d9ab72217db7339e92df163f Mon Sep 17 00:00:00 2001 From: Zingam Date: Sun, 10 Dec 2023 14:16:02 +0200 Subject: [PATCH 1/4] [libc++][span] P2821R5: span.at() --- libcxx/include/span

[libcxx] [llvm] [clang-tools-extra] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/74994 >From 6e26ca239c49e1b7d9ab72217db7339e92df163f Mon Sep 17 00:00:00 2001 From: Zingam Date: Sun, 10 Dec 2023 14:16:02 +0200 Subject: [PATCH 1/5] [libc++][span] P2821R5: span.at() --- libcxx/include/span

[libcxx] [llvm] [clang-tools-extra] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/74994 >From 6e26ca239c49e1b7d9ab72217db7339e92df163f Mon Sep 17 00:00:00 2001 From: Zingam Date: Sun, 10 Dec 2023 14:16:02 +0200 Subject: [PATCH 1/6] [libc++][span] P2821R5: span.at() --- libcxx/include/span

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov ready_for_review https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Hristo Hristov (H-G-Hristov) Changes Implements: [P2821R5](https://wg21.link/P2821R5) --- Full diff: https://github.com/llvm/llvm-project/pull/74994.diff 5 Files Affected: - (modified) libcxx/docs/ReleaseNotes/18.rst (+1) - (modified)

[clang] [clang] Better bitfield access units (PR #65742)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly @llvm/pr-subscribers-clang Author: Nathan Sidwell (urnathan) Changes Reimplement the SysV (non-Microsoft) bitfield access unit computation. For avoidance of doubt, this is not an ABI change, but the memory accesses Clang emits to ac

[clang] [clang] Better bitfield access units (PR #65742)

2023-12-10 Thread Nathan Sidwell via cfe-commits
urnathan wrote: Rebased https://github.com/llvm/llvm-project/pull/65742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Adjust TBAA Base Info API (PR #73263)

2023-12-10 Thread Nathan Sidwell via cfe-commits
urnathan wrote: > I'd tend to prefer to keep the simpler name for the external interface, and > use a more complicated one for use within the class. So maybe introduce > getValidBaseTypeInfo(). This naming scheme better? https://github.com/llvm/llvm-project/pull/73263

[llvm] [clang-tools-extra] [clang] [libcxx] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov edited https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libcxx] [clang] [llvm] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -41,7 +41,6 @@ void testRuntimeSpan(Span sp, std::size_t idx) assert(r1 == r2); } -struct A{}; philnik777 wrote: Unrelated change? https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list

[llvm] [libcxx] [clang-tools-extra] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 requested changes to this pull request. Looks mostly good, but I have a few small comments. https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[llvm] [libcxx] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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] [clang] [llvm] [libcxx] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { + if (__idx >= size()) { +__throw_out_of_range(); + } + return *(data() + __idx); --

[clang-tools-extra] [clang] [llvm] [libcxx] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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] [Cygwin] Cygwin macro (PR #74973)

2023-12-10 Thread Yingchi Long via cfe-commits
https://github.com/inclyc commented: Would you please add some tests about your changes? Also maybe it will be more useful to write some detailed descriptions, so others can understand your code easily. Cheers! https://github.com/llvm/llvm-project/pull/74973 ___

[clang] [Cygwin] Reduced number of inline elements of CallArgList. (PR #74977)

2023-12-10 Thread Yingchi Long via cfe-commits
https://github.com/inclyc commented: > This fix bootstraping on Cygwin, using GCC 13.2.0 as stage 0 compiler. It seems that the size of CallArgList can't exceed an unknown limit. How about paste some logs here? This change seems to be completely NFC, and I suppose it shall work for GCC 13? htt

[llvm] [clang-tools-extra] [libcxx] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Mark de Wever via cfe-commits
https://github.com/mordante edited https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [libcxx] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Mark de Wever via cfe-commits
https://github.com/mordante requested changes to this pull request. Thanks for working in this. I didn't start the CI jobs since I know they will fail. https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm

[libcxx] [llvm] [clang-tools-extra] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Mark de Wever via cfe-commits
@@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { + if (__idx >= size()) { +__throw_out_of_range(); + } + return *(data() + __idx); --

[llvm] [libcxx] [clang-tools-extra] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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

[libcxx] [clang] [llvm] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Mark de Wever via cfe-commits
@@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { mordante wrote: You need to export this declaration from the `modules/span.inc` too. htt

[llvm] [libcxx] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Mark de Wever via cfe-commits
@@ -146,6 +147,9 @@ template #include <__utility/forward.h> #include // for array #include // for byte +#if _LIBCPP_STD_VER >= 26 +# include mordante wrote: Typically we unconditionally include headers. https://github.com/llvm/llvm-project/pul

[clang-tools-extra] [libcxx] [llvm] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Mark de Wever via cfe-commits
@@ -552,6 +578,10 @@ public: private: pointer __data_; size_type __size_; + +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range() const { std::__throw_out_of_range("span"); } mordante wrote: Either remo

[llvm] [clang] [clang-tools-extra] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-12-10 Thread via cfe-commits
https://github.com/Da-Viper updated https://github.com/llvm/llvm-project/pull/69102 >From 21156656433fb8d2dc5a805d97cbd20fa916fff9 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Sun, 15 Oct 2023 11:39:42 +0100 Subject: [PATCH 1/9] Fix #35272: Don't replace typedefs in extern c scope --- ...

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Mark de Wever via cfe-commits
https://github.com/mordante commented: I pressed submit too soon ;-) You need to update the FTM as implemented too and update the generated files. https://github.com/llvm/llvm-project/pull/74994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread Björn Schäpers via cfe-commits
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { return true; } - // If the return type spans multiple lines, wrap before the function name. - if (((Current.is(TT_FunctionDeclarationName) && -!State.Line->ReturnTypeWrapped

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread Björn Schäpers via cfe-commits
@@ -26465,6 +26451,21 @@ TEST_F(FormatTest, BreakAfterAttributes) { "{\n" "}", CtorDtorCode, Style); + + Style.BreakBeforeBraces = FormatStyle::BS_Attach; + Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread Björn Schäpers via cfe-commits
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { return true; } - // If the return type spans multiple lines, wrap before the function name. - if (((Current.is(TT_FunctionDeclarationName) && -!State.Line->ReturnTypeWrapped

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread Björn Schäpers via cfe-commits
@@ -583,21 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { return true; } - // If the return type spans multiple lines, wrap before the function name. - if (((Current.is(TT_FunctionDeclarationName) && -!State.Line->ReturnTypeWrapped

[clang] 65a1841 - [DirectoryWatcher] Include limits.h instead of MathExtras.h (NFC)

2023-12-10 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-12-10T12:12:54-08:00 New Revision: 65a18412ab26f92df133ca1ef3ff7ff7dbf3c5f8 URL: https://github.com/llvm/llvm-project/commit/65a18412ab26f92df133ca1ef3ff7ff7dbf3c5f8 DIFF: https://github.com/llvm/llvm-project/commit/65a18412ab26f92df133ca1ef3ff7ff7dbf3c5f8.diff L

[llvm] [clang-tools-extra] [libcxx] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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

[libcxx] [clang] [llvm] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { + if (__idx >= size()) { +__throw_out_of_range(); + } + return *(data() + __idx); --

[llvm] [clang] [libcxx] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
@@ -41,7 +41,6 @@ void testRuntimeSpan(Span sp, std::size_t idx) assert(r1 == r2); } -struct A{}; H-G-Hristov wrote: Yes, I can restore that change. Initially I was looking into reusing op_idx tests and I noticed that this declaration is unused. https:/

[llvm] [clang] [libcxx] [clang-tools-extra] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
@@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 +_LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { + if (__idx >= size()) { +__throw_out_of_range(); + } + return *(data() + __idx); --

[clang] [clang-tools-extra] [llvm] [libcxx] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Hristo Hristov via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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

[llvm] [clang-tools-extra] [libcxx] [clang] [libc++][span] P2821R5: span.at() (PR #74994)

2023-12-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,136 @@ +//===--===// +// +// 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] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +#include +#include +#include +#include + +__attribute__((__format__ (__scanf__, 1, 4))) +void f1(char *out, const size_t len, const char *format, ... /* args */) +{ +va_list args;

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: Two additional checks that might be interesting: * Look at the `FormatIdx` argument. Is it a `DeclRefExpr` referring to a `ParmVarDecl`, perhaps with some conversions? (There is probably going to be an `LValueToRValue` conversion at least. There are sp

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,132 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +#include +#include + +void f1(const std::string &str, ... /* args */) +{ +va_list args; +vscanf(str.c_str(), args); // no warning +vprintf(str.c_str(), args); // no warning +

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +#include +#include +#include +#include + +__attribute__((__format__ (__scanf__, 1, 4))) +void f1(char *out, const size_t len, const char *format, ... /* args */) +{ +va_list args;

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { return true; } - // If the return type spans multiple lines, wrap before the function name. - if (((Current.is(TT_FunctionDeclarationName) && -!State.Line->ReturnTypeWrapped

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme updated https://github.com/llvm/llvm-project/pull/74943 >From b80f8579dbc745ddfaa3d60770dd0d3e79e6c641 Mon Sep 17 00:00:00 2001 From: XDeme Date: Sat, 9 Dec 2023 14:31:12 -0300 Subject: [PATCH 1/7] Fixes overload operator in BreakAfterAttributes --- clang/lib/Format/Co

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
@@ -583,21 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { return true; } - // If the return type spans multiple lines, wrap before the function name. - if (((Current.is(TT_FunctionDeclarationName) && -!State.Line->ReturnTypeWrapped

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
@@ -26465,6 +26451,21 @@ TEST_F(FormatTest, BreakAfterAttributes) { "{\n" "}", CtorDtorCode, Style); + + Style.BreakBeforeBraces = FormatStyle::BS_Attach; + Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left;

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
@@ -583,20 +583,31 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { return true; } - // If the return type spans multiple lines, wrap before the function name. - if (((Current.is(TT_FunctionDeclarationName) && -!State.Line->ReturnTypeWrapped

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
XDeme wrote: One thing that I checked only now, is that with clang-format 16.0.6 and 17.0.6, it formats correctly. But with `clang-format version 18.0.0 (https://github.com/llvm/llvm-project.git a6c02edd6eac476523b5c73f29619a7a9e054872)` is doens't anymore, so this is a regression introduced r

[clang] [clang] Catch missing format attributes (PR #70024)

2023-12-10 Thread Aaron Puchert via cfe-commits
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const ParsedAttr &AL) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// Warn if parent function misses format attribute. Parent function misses +// format attribute if there is an argum

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Mircea Trofin via cfe-commits
@@ -31,31 +31,45 @@ using LoadStorePair = std::pair; /// Instrumentation based profiling lowering pass. This pass lowers /// the profile instrumented code generated by FE or the IR based /// instrumentation pass. -class InstrProfiling : public PassInfoMixin { +class InstrProfil

[clang] [Clang][LoongArch] Comply with the lp64d ABI to pass vector arguments (PR #74990)

2023-12-10 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. https://github.com/llvm/llvm-project/pull/74990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Mircea Trofin via cfe-commits
https://github.com/mtrofin updated https://github.com/llvm/llvm-project/pull/74970 >From 90893a3b3f71524947cb041b2a25d0a02a8956d7 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Sat, 9 Dec 2023 21:24:35 -0800 Subject: [PATCH 1/2] [NFC][InstrProf] Refactor InstrProfiling lowering pass Akin o

[clang] [Clang][Sema] Check the number of lambda non-concept tempate parameters (PR #74885)

2023-12-10 Thread via cfe-commits
knightXun wrote: > This needs at least one test and a Release note. > > I expect the code form the issue to be well-formed: > https://godbolt.org/z/bhdfG34xc > > So I am curious why you are adding the diagnostic for? thanks for the hit! https://github.com/llvm/llvm-project/pull/74885 __

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2023-12-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @sam-mccall ping! https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1d608fc - [NFC][InstrProf] Refactor InstrProfiling lowering pass (#74970)

2023-12-10 Thread via cfe-commits
Author: Mircea Trofin Date: 2023-12-10T18:03:08-08:00 New Revision: 1d608fc755a3e15d0020f61c9535c9b730ab9dec URL: https://github.com/llvm/llvm-project/commit/1d608fc755a3e15d0020f61c9535c9b730ab9dec DIFF: https://github.com/llvm/llvm-project/commit/1d608fc755a3e15d0020f61c9535c9b730ab9dec.diff

[llvm] [clang] [NFC][InstrProf] Refactor InstrProfiling lowering pass (PR #74970)

2023-12-10 Thread Mircea Trofin via cfe-commits
https://github.com/mtrofin closed https://github.com/llvm/llvm-project/pull/74970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9406ea3 - [NFC] [Serialization] Packing more bits

2023-12-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-12-11T10:18:12+08:00 New Revision: 9406ea3fe32e59a7d28de0dcbd0317b4cdfa4c62 URL: https://github.com/llvm/llvm-project/commit/9406ea3fe32e59a7d28de0dcbd0317b4cdfa4c62 DIFF: https://github.com/llvm/llvm-project/commit/9406ea3fe32e59a7d28de0dcbd0317b4cdfa4c62.diff LO

[clang] 1095105 - [clang] Remove unused variable 'ExprDependenceBits' in ASTWriterDecl.cpp (NFC)

2023-12-10 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2023-12-11T10:45:56+08:00 New Revision: 10951050b5f371eb3e7cacce1691c4eb2fe2eab5 URL: https://github.com/llvm/llvm-project/commit/10951050b5f371eb3e7cacce1691c4eb2fe2eab5 DIFF: https://github.com/llvm/llvm-project/commit/10951050b5f371eb3e7cacce1691c4eb2fe2eab5.diff LOG: [

[clang-tools-extra] [clang] [mlir] [llvm] Generalize depthwise conv (PR #75017)

2023-12-10 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 10951050b5f371eb3e7cacce1691c4eb2fe2eab5 1ccaf0d034d73145ddfa9e3265f856950628a7f7 --

[clang-tools-extra] [clangd] Initialize HighlightingsBuilder::Resolver (PR #74971)

2023-12-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/74971 >From 86d99f7b29a131b949b32f18ff15eb1d1f5e4d3a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 10 Dec 2023 00:50:54 -0500 Subject: [PATCH] [clangd] Initialize HighlightingsBuilder::Resolver --- cl

[clang-tools-extra] [clangd] Initialize HighlightingsBuilder::Resolver (PR #74971)

2023-12-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/74971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 9d3ea5a - [clangd] Initialize HighlightingsBuilder::Resolver (#74971)

2023-12-10 Thread via cfe-commits
Author: Nathan Ridge Date: 2023-12-10T22:05:51-05:00 New Revision: 9d3ea5a06abe08fa37053b825b3a1510d96bb7fb URL: https://github.com/llvm/llvm-project/commit/9d3ea5a06abe08fa37053b825b3a1510d96bb7fb DIFF: https://github.com/llvm/llvm-project/commit/9d3ea5a06abe08fa37053b825b3a1510d96bb7fb.diff

[llvm] [clang] [PGO][nfc] Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2023-12-10 Thread Elvis Wang via cfe-commits
https://github.com/ElvisWang123 created https://github.com/llvm/llvm-project/pull/75021 The original `-fdiagnostics-show-hotness` option show the relative number of the loop count which is calculate by the `function_entry_count` and `branch_frequency`. We want to know the real loop iteration c

[llvm] [clang] [PGO][nfc] Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2023-12-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-llvm-ir Author: Elvis Wang (ElvisWang123) Changes The original `-fdiagnostics-show-hotness` option show the relative number of the loop count which is calculate by the `function_entry_count` and `branch_frequency`. We

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Check the number of lambda non-concept tempate parameters (PR #74885)

2023-12-10 Thread via cfe-commits
https://github.com/knightXun updated https://github.com/llvm/llvm-project/pull/74885 >From 12cc1fe332fbab94c1368ea95374d5a1289a22f8 Mon Sep 17 00:00:00 2001 From: knightXun Date: Sat, 9 Dec 2023 04:57:15 +0800 Subject: [PATCH 01/15] [Clang][Sema] Check the number of lambda non-concept tempate

[clang] [clang-format] Fix operator overload inconsistency in `BreakAfterAttributes: Always` (PR #74943)

2023-12-10 Thread via cfe-commits
https://github.com/XDeme edited https://github.com/llvm/llvm-project/pull/74943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >