[flang] [clang-tools-extra] [compiler-rt] [libcxxabi] [openmp] [libcxx] [clang] [mlir] [libc] [llvm] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-11 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I seem to be the only one, but I don't understand how this isn't shadowing. The whole point of the shadowing warning is to avoid confusion about which variable is actually used, which IMO could very well be the case here. I think it would be much better to get a new flag to

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

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

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

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

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

[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

[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

[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] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2023-12-09 Thread Nikolas Klauser via cfe-commits
@@ -171,13 +172,61 @@ class DiagnosticMapping { class DiagnosticIDs : public RefCountedBase { public: /// The level of the diagnostic, after it has been through mapping. - enum Level { + enum Level : uint8_t { Ignored, Note, Remark, Warning, Error, Fatal }; + //

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2023-12-09 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/70976 >From a91f499900d4cea4804833d004b6c4e54a7d8b15 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sun, 3 Sep 2023 17:26:28 -0700 Subject: [PATCH] [clang] Extend diagnose_if to accept more detailed warning

[llvm] [libcxx] [libunwind] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-12-03 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. https://github.com/llvm/llvm-project/pull/68753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-12-02 Thread Nikolas Klauser via cfe-commits
@@ -92,14 +94,14 @@ namespace ImplicitCapture { [] { return ref_i; }; // expected-error {{variable 'ref_i' cannot be implicitly captured in a lambda with no capture-default specified}} expected-note {{lambda expression begins here}} expected-note 2 {{capture 'ref_i' by}}

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-12-02 Thread Nikolas Klauser via cfe-commits
@@ -92,14 +94,14 @@ namespace ImplicitCapture { [] { return ref_i; }; // expected-error {{variable 'ref_i' cannot be implicitly captured in a lambda with no capture-default specified}} expected-note {{lambda expression begins here}} expected-note 2 {{capture 'ref_i' by}}

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

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

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2023-12-02 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > The tests changes look mostly unrelated to this PR They mostly are. I found this while trying to check C++03 with the test and noticed that C++11 also crashes, so I updated the test to also run in C++11. https://github.com/llvm/llvm-project/pull/74110

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-12-02 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 563f86bddc0ec59b63c6aeffee2342f027c09119 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Dec 2023 18:16:36 +0100 Subject: [PATCH 1/2] [clang] Fix crash when declaring invalid lambda member

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

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

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,10 @@ +// CUDA headers define __noinline__ which interferes with libc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libstdc++ header. philnik777 wrote:

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,10 @@ +// CUDA headers define __noinline__ which interferes with libc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libstdc++ header. philnik777 wrote:

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2023-12-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/74110 I've come across this while working on implementing lambdas in C++03. >From 563f86bddc0ec59b63c6aeffee2342f027c09119 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Dec 2023 18:16:36 +0100

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

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

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @shafik See https://discourse.llvm.org/t/rfc-allow-c-11-lambdas-in-c-03-as-an-extension/75262 https://github.com/llvm/llvm-project/pull/73376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

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

[libcxx] [clang-tools-extra] [libc] [flang] [lld] [compiler-rt] [llvm] [libunwind] [mlir] [clang] [libcxxabi] [lldb] Implement libcxx ranges contains (PR #70258)

2023-11-28 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I've reopened the old one for you. Let's keep the discussion in one place. https://github.com/llvm/llvm-project/pull/70258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-11-28 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 reopened https://github.com/llvm/llvm-project/pull/65148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-11-28 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/17] [libc++] Implement ranges::contains Differential Revision:

[clang-tools-extra] [flang] [libunwind] [libcxx] [lldb] [llvm] [mlir] [compiler-rt] [clang] [libcxxabi] [lld] [libc] Implement libcxx ranges contains (PR #70258)

2023-11-28 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/70258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Move documentation about -verify from a header to public docs (PR #73694)

2023-11-28 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Would it make sense to document this more publicly? While it's designed to be an internal tool, it's really useful for people who want to make sure their library produces high quality diagnostics (e.g. `nodiscard`, `static_assert`s etc.). I'm sure you are aware that libc++

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2023-11-28 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: gentle ping~ https://github.com/llvm/llvm-project/pull/70976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-27 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > Was there an RFC asking the community about exposing lambdas in pre C++11 > modes? This is a sufficiently large language extension that we probably > should verify if we haven't already. I believe this is a conforming extension > (I can't think of a circumstance under

[libunwind] 3537338 - [libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++

2023-08-04 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-08-04T00:51:43-07:00 New Revision: 3537338d1ab9b6da4b58499877953deb81c59e5e URL: https://github.com/llvm/llvm-project/commit/3537338d1ab9b6da4b58499877953deb81c59e5e DIFF:

[clang] 874217f - [clang] Enable C++11-style attributes in all language modes

2023-07-22 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-07-22T09:34:15-07:00 New Revision: 874217f99b99ab3c9026dc3b7bd84cd2beebde6e URL: https://github.com/llvm/llvm-project/commit/874217f99b99ab3c9026dc3b7bd84cd2beebde6e DIFF:

[clang] 7a59e2c - [clang][NFC] Remove trailing whitespace from riscv_vector.td

2023-07-14 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-07-14T12:38:29-07:00 New Revision: 7a59e2c59187fc76e39b0e4d5bfd13a0a5144c44 URL: https://github.com/llvm/llvm-project/commit/7a59e2c59187fc76e39b0e4d5bfd13a0a5144c44 DIFF:

[clang] c6b4433 - [clang] Fix __is_trivially_equality_comparable for classes which contain arrays of non-trivially equality comparable types

2023-07-10 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-07-10T11:09:38-07:00 New Revision: c6b4433a0f20c5ebbd72cee8fd0dcfdb429e619c URL: https://github.com/llvm/llvm-project/commit/c6b4433a0f20c5ebbd72cee8fd0dcfdb429e619c DIFF:

[clang] 3cf8b98 - [clang] Fix checking the equality comparator of base classes in __is_trivially_equality_comparable

2023-06-28 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-06-28T13:34:02-07:00 New Revision: 3cf8b982042e91d9aabb880ccc7a556256187ff9 URL: https://github.com/llvm/llvm-project/commit/3cf8b982042e91d9aabb880ccc7a556256187ff9 DIFF:

[clang] 4de66e8 - [clang] __is_trivially_equality_comparable should return false for arrays

2023-06-26 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-06-26T09:36:58-07:00 New Revision: 4de66e8c44348fb1e85268b10a7f862381e695c7 URL: https://github.com/llvm/llvm-project/commit/4de66e8c44348fb1e85268b10a7f862381e695c7 DIFF:

[clang] f6d557e - [clang][NFC] Remove trailing whitespaces and enforce it in lib, include and docs

2023-06-26 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-06-26T09:34:36-07:00 New Revision: f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81 URL: https://github.com/llvm/llvm-project/commit/f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81 DIFF:

[clang] 0e4c4c7 - [clang] Extend __is_trivially_equality_comparable to check for hidden friends

2023-05-30 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-05-30T08:33:31-07:00 New Revision: 0e4c4c77730810db235d377d49ba5860dfa0bd8d URL: https://github.com/llvm/llvm-project/commit/0e4c4c77730810db235d377d49ba5860dfa0bd8d DIFF:

[clang] b09fad7 - [clang] Document extensions from later standards

2023-05-11 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-05-11T11:54:46-07:00 New Revision: b09fad7f8e9ce5b88fb467be012ea379efa3659d URL: https://github.com/llvm/llvm-project/commit/b09fad7f8e9ce5b88fb467be012ea379efa3659d DIFF:

[clang] 465d487 - [clang] Fix __is_trivially_equality_comparable for non-trivially-copyable types

2023-05-08 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-05-08T12:07:28-07:00 New Revision: 465d487481313492e13435f3f03874b923b86ce3 URL: https://github.com/llvm/llvm-project/commit/465d487481313492e13435f3f03874b923b86ce3 DIFF:

[clang] e98776a - [clang] Add __is_trivially_equality_comparable

2023-04-17 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-04-17T15:36:21+02:00 New Revision: e98776a180a74c08dcc07cebf26c11deac6e975a URL: https://github.com/llvm/llvm-project/commit/e98776a180a74c08dcc07cebf26c11deac6e975a DIFF:

[libunwind] a7aade1 - [runtimes] Synchronize warnings flags between libc++/libc++abi/libunwind

2023-03-16 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-03-17T00:40:59+01:00 New Revision: a7aade1f36eb60161235b66bca46db12e5326a0c URL: https://github.com/llvm/llvm-project/commit/a7aade1f36eb60161235b66bca46db12e5326a0c DIFF:

[libunwind] 141471a - [runtimes] Remove unused functions from Handle{Libcxx,Libunwind}Flags.cmake

2023-02-21 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2023-02-22T00:38:44+01:00 New Revision: 141471a0cbf2d029899b29baf1a54a238f6067f9 URL: https://github.com/llvm/llvm-project/commit/141471a0cbf2d029899b29baf1a54a238f6067f9 DIFF:

[clang] 3ba8548 - [libc++][ranges] Implement ranges::transform

2022-04-05 Thread Nikolas Klauser via cfe-commits
Author: Nikolas Klauser Date: 2022-04-05T11:06:28+02:00 New Revision: 3ba8548c8e04bb301c4243887362c54bfbd4af8b URL: https://github.com/llvm/llvm-project/commit/3ba8548c8e04bb301c4243887362c54bfbd4af8b DIFF:

<    1   2   3