[Lldb-commits] [lldb] [lldb] Add armv7a and armv8a ArchSpecs (PR #106433)

2024-08-29 Thread Christopher Di Bella via lldb-commits

https://github.com/cjdb closed https://github.com/llvm/llvm-project/pull/106433
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libcxx] [clang] [clang-tools-extra] [compiler-rt] [llvm] [flang] [lldb] [libunwind] [libc] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -13,7 +13,7 @@
 // Range algorithms should return `std::ranges::dangling` when given a 
dangling range.
 

cjdb wrote:

Please revert and apply in a separate patch.

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [flang] [clang] [lldb] [libcxx] [libc] [libunwind] [llvm] [clang-tools-extra] [compiler-rt] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -0,0 +1,171 @@
+//===--===//
+//
+// 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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+// Testing std::ranges::iota
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
+
+#include 
+#include 
+#include 
+#include 
+#include  // TODO RM
+
+#include "test_macros.h"
+#include "test_iterators.h"
+#include "almost_satisfies_types.h"
+
+//
+// Testing constraints
+//
+
+// Concepts to check different overloads of std::ranges::iota
+template 
+concept HasIotaIter = requires(Iter&& iter, Sent&& sent, Value&& val) {
+  std::ranges::iota(std::forward(iter), std::forward(sent), 
std::forward(val));
+};
+
+template 
+concept HasIotaRange =
+requires(Range&& range, Value&& val) { 
std::ranges::iota(std::forward(range), std::forward(val)); };
+
+// Test constraints of the iterator/sentinel overload
+// ==
+static_assert(HasIotaIter);
+
+// !input_or_output_iterator
+static_assert(!HasIotaIter);
+
+// !sentinel_for
+static_assert(!HasIotaIter);
+static_assert(!HasIotaIter);
+
+// !weakly_incrementable
+static_assert(!HasIotaIter);
+
+// !indirectly writable 
+static_assert(!HasIotaIter);
+
+// Test constraints for the range overload
+// ===
+static_assert(HasIotaRange, int>);
+
+// !weakly_incrementable
+static_assert(!HasIotaRange, 
WeaklyIncrementableNotMovable>);
+
+// !ranges::output_range
+static_assert(!HasIotaRange, 
OutputIteratorNotIndirectlyWritable>);
+
+//
+// Testing results
+//
+
+struct DangerousCopyAssign {
+  int val;
+  using difference_type = int;
+
+  constexpr explicit DangerousCopyAssign(int v) : val(v) {}
+
+  // Needed in postfix
+  constexpr DangerousCopyAssign(DangerousCopyAssign const& other) { this->val 
= other.val; }
+
+  // mischievious copy assignment that we won't use if the
+  // std::as_const inside ranges::iota isn't working, this should perturb the
+  // results
+  constexpr DangerousCopyAssign& operator=(DangerousCopyAssign& a) {
+++a.val;
+this->val = a.val;
+return *this;
+  }
+
+  // safe copy assignment std::as_const inside ranges::iota should ensure this
+  // overload gets called
+  constexpr DangerousCopyAssign& operator=(DangerousCopyAssign const& a) {
+this->val = a.val;
+return *this;
+  }
+
+  constexpr bool operator==(DangerousCopyAssign const& rhs) { return this->val 
== rhs.val; }
+
+  // prefix
+  constexpr DangerousCopyAssign& operator++() {
+++(this->val);
+return *this;
+  }
+
+  // postfix
+  constexpr DangerousCopyAssign operator++(int) {
+auto tmp = *this;
+++this->val;
+return tmp;
+  }
+};
+
+template 
+constexpr void test_result(std::array input, T starting_value, 
std::array const expected) {
+  { // (iterator, sentinel) overload
+auto in_begin = Iter(input.data());
+auto in_end   = Sent(Iter(input.data() + input.size()));
+std::same_as> decltype(auto) result 
=
+std::ranges::iota(std::move(in_begin), std::move(in_end), 
starting_value);
+assert(result.out == in_end);
+if constexpr (expected.size() > 0) {
+  assert(result.value == expected.back() + 1);
+} else {
+  assert(result.value == starting_value);
+}
+assert(std::ranges::equal(input, expected));
+  }
+
+  // The range overload adds the additional constraint that it must be an 
outputrange
+  // so skip this for the input iterators we test
+  if constexpr (!std::is_same_v> &&
+!std::is_same_v>) { // (range) 
overload
+auto in_begin = Iter(input.data());
+auto in_end   = Sent(Iter(input.data() + input.size()));
+auto range= std::ranges::subrange(std::move(in_begin), 
std::move(in_end));
+
+std::same_as> decltype(auto) result 
=
+std::ranges::iota(range, starting_value);
+assert(result.out == in_end);
+assert(result.value == starting_value + N);
+assert(std::ranges::equal(input, expected));
+  }

cjdb wrote:

Please move this conditional logic into a separate test case.

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [lldb] [llvm] [compiler-rt] [libcxx] [libc] [clang-tools-extra] [flang] [libunwind] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits

https://github.com/cjdb requested changes to this pull request.

Thanks for working on this, it's an important algorithm to have. I've left some 
comments, but would like to see this merged by the end of January.

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libunwind] [lldb] [flang] [libc] [llvm] [clang-tools-extra] [clang] [libcxx] [compiler-rt] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -1083,6 +1083,27 @@ rvalue_iterator(T*) -> rvalue_iterator;
 
 static_assert(std::random_access_iterator>);
 
+// The ProxyDiffTBase allows us to conditionally specify 
Proxy::difference_type
+// which we need in certain situations. For example when we want
+// std::weakly_incrementable> to be true.
+template 
+struct ProxyDiffTBase {};
+
+template 
+  requires requires { std::iter_difference_t{}; }
+struct ProxyDiffTBase {
+  using difference_type = std::iter_difference_t;
+};
+
+// These concepts allow us to conditionally add the pre-/postfix operators
+// when T also supports those member functions. Like ProxyDiffTBase, this
+// is necessary when we want std::weakly_incrementable> to be true.
+template 
+concept HasPreIncrementOp = requires(T const& obj) { ++obj; };
+
+template 
+concept HasPostIncrementOp = requires(T const& obj) { obj++; };
+

cjdb wrote:

These may be better off in a local header, since they're very 
`ranges::iota`-specific.

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libunwind] [clang] [clang-tools-extra] [llvm] [flang] [compiler-rt] [libcxx] [libc] [lldb] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -0,0 +1,71 @@
+// -*- 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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+#ifndef _LIBCPP___NUMERIC_RANGES_IOTA_H
+#define _LIBCPP___NUMERIC_RANGES_IOTA_H
+
+#include <__algorithm/out_value_result.h>
+#include <__config>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+#include <__utility/as_const.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#  pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 23
+namespace ranges {
+template 
+using iota_result = ranges::out_value_result<_Out, _Tp>;
+
+namespace __ranges_iota {

cjdb wrote:

This namespace isn't necessary, and I'm working on a patch to remove the ones 
that are already checked in. Since this patch is happening concurrently, would 
you mind removing this namespace here?

Alternatively, you can track #76543 and hold off removing this until that lands 
in main.

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang-tools-extra] [flang] [libunwind] [libc] [llvm] [lldb] [libcxx] [compiler-rt] [clang] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -1149,9 +1171,11 @@ struct Proxy {
   // Calling swap(Proxy{}, Proxy{}) would fail (pass prvalues)
 
   // Compare operators are defined for the convenience of the tests
-  friend constexpr bool operator==(const Proxy&, const Proxy&)
-requires (std::equality_comparable && !std::is_reference_v)
-  = default;
+  friend constexpr bool operator==(const Proxy& lhs, const Proxy& rhs)
+requires(std::equality_comparable && !std::is_reference_v)
+  {
+return lhs.data == rhs.data;
+  };

cjdb wrote:

What is the intention of this change?

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [flang] [libcxx] [libc] [clang-tools-extra] [llvm] [libunwind] [lldb] [clang] [compiler-rt] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -0,0 +1,71 @@
+// -*- 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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+#ifndef _LIBCPP___NUMERIC_RANGES_IOTA_H
+#define _LIBCPP___NUMERIC_RANGES_IOTA_H
+
+#include <__algorithm/out_value_result.h>
+#include <__config>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+#include <__utility/as_const.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#  pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 23
+namespace ranges {
+template 
+using iota_result = ranges::out_value_result<_Out, _Tp>;
+
+namespace __ranges_iota {
+struct __iota_fn {
+private:
+  // Private helper function
+  template 
+  _LIBCPP_HIDE_FROM_ABI static constexpr iota_result<_Out, _Tp> 
__iota_impl(_Out __first, _Sent __last, _Tp __value) {
+while (__first != __last) {
+  *__first = std::as_const(__value);
+  ++__first;
+  ++__value;
+}
+return {std::move(__first), std::move(__value)};
+  }
+
+public:
+  // Public facing interfaces
+  template  _Sent, 
weakly_incrementable _Tp>
+requires indirectly_writable<_Out, const _Tp&>
+  _LIBCPP_HIDE_FROM_ABI static constexpr iota_result<_Out, _Tp> 
operator()(_Out __first, _Sent __last, _Tp __value) {
+return __iota_impl(std::move(__first), std::move(__last), 
std::move(__value));
+  }
+
+  template  _Range>
+  _LIBCPP_HIDE_FROM_ABI static constexpr 
iota_result, _Tp>
+  operator()(_Range&& __r, _Tp __value) {
+return __iota_impl(ranges::begin(__r), ranges::end(__r), 
std::move(__value));
+  }
+};
+} // namespace __ranges_iota
+
+inline namespace __cpo {

cjdb wrote:

Similar to the `__iota` namespace, this is likely going to be removed. Please 
track the discussion in #76542.

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libcxx] [compiler-rt] [clang-tools-extra] [libc] [clang] [flang] [lldb] [llvm] [libunwind] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -0,0 +1,171 @@
+//===--===//
+//
+// 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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+// Testing std::ranges::iota
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
+
+#include 
+#include 
+#include 
+#include 
+#include  // TODO RM
+
+#include "test_macros.h"
+#include "test_iterators.h"
+#include "almost_satisfies_types.h"
+
+//
+// Testing constraints
+//
+
+// Concepts to check different overloads of std::ranges::iota
+template 
+concept HasIotaIter = requires(Iter&& iter, Sent&& sent, Value&& val) {
+  std::ranges::iota(std::forward(iter), std::forward(sent), 
std::forward(val));
+};
+
+template 
+concept HasIotaRange =
+requires(Range&& range, Value&& val) { 
std::ranges::iota(std::forward(range), std::forward(val)); };
+
+// Test constraints of the iterator/sentinel overload
+// ==
+static_assert(HasIotaIter);
+
+// !input_or_output_iterator
+static_assert(!HasIotaIter);
+
+// !sentinel_for
+static_assert(!HasIotaIter);
+static_assert(!HasIotaIter);
+
+// !weakly_incrementable
+static_assert(!HasIotaIter);
+
+// !indirectly writable 
+static_assert(!HasIotaIter);
+
+// Test constraints for the range overload
+// ===
+static_assert(HasIotaRange, int>);
+
+// !weakly_incrementable
+static_assert(!HasIotaRange, 
WeaklyIncrementableNotMovable>);
+
+// !ranges::output_range
+static_assert(!HasIotaRange, 
OutputIteratorNotIndirectlyWritable>);
+
+//
+// Testing results
+//
+
+struct DangerousCopyAssign {
+  int val;
+  using difference_type = int;
+
+  constexpr explicit DangerousCopyAssign(int v) : val(v) {}
+
+  // Needed in postfix
+  constexpr DangerousCopyAssign(DangerousCopyAssign const& other) { this->val 
= other.val; }
+
+  // mischievious copy assignment that we won't use if the
+  // std::as_const inside ranges::iota isn't working, this should perturb the
+  // results
+  constexpr DangerousCopyAssign& operator=(DangerousCopyAssign& a) {
+++a.val;
+this->val = a.val;
+return *this;
+  }
+
+  // safe copy assignment std::as_const inside ranges::iota should ensure this
+  // overload gets called
+  constexpr DangerousCopyAssign& operator=(DangerousCopyAssign const& a) {
+this->val = a.val;
+return *this;
+  }
+
+  constexpr bool operator==(DangerousCopyAssign const& rhs) { return this->val 
== rhs.val; }
+
+  // prefix
+  constexpr DangerousCopyAssign& operator++() {
+++(this->val);
+return *this;
+  }
+
+  // postfix
+  constexpr DangerousCopyAssign operator++(int) {
+auto tmp = *this;
+++this->val;
+return tmp;
+  }
+};
+
+template 
+constexpr void test_result(std::array input, T starting_value, 
std::array const expected) {
+  { // (iterator, sentinel) overload
+auto in_begin = Iter(input.data());
+auto in_end   = Sent(Iter(input.data() + input.size()));
+std::same_as> decltype(auto) result 
=
+std::ranges::iota(std::move(in_begin), std::move(in_end), 
starting_value);
+assert(result.out == in_end);
+if constexpr (expected.size() > 0) {
+  assert(result.value == expected.back() + 1);
+} else {
+  assert(result.value == starting_value);
+}

cjdb wrote:

Please avoid using logic in test cases.

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang-tools-extra] [libc] [llvm] [libunwind] [flang] [lldb] [libcxx] [clang] [compiler-rt] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -1172,6 +1198,22 @@ struct Proxy {
 requires std::three_way_comparable_with, std::decay_t> {
 return lhs.data <=> rhs.data;
   }
+
+  // Needed to allow certain types to be weakly_incremental
+  constexpr Proxy& operator++()
+requires(HasPreIncrementOp)
+  {
+++data;
+return *this;
+  }
+
+  constexpr Proxy operator++(int)
+requires(HasPostIncrementOp)
+  {
+Proxy tmp = *this;
+operator++();
+return tmp;
+  }

cjdb wrote:

Please use `std::weakly_incrementable` and `std::incrementable`. You'll also 
need to support `void operator++(int)` for when a type is weakly 
incremenetable, but not incrementable.

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [llvm] [compiler-rt] [libcxx] [lldb] [libunwind] [flang] [libc] [clang-tools-extra] [clang] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits

https://github.com/cjdb edited https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libcxx] [flang] [libunwind] [libc] [llvm] [lldb] [clang-tools-extra] [compiler-rt] [clang] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -1161,9 +1185,11 @@ struct Proxy {
 return lhs.data == rhs.data;
   }
 
-  friend constexpr auto operator<=>(const Proxy&, const Proxy&)
-requires (std::three_way_comparable && !std::is_reference_v)
-  = default;
+  friend constexpr auto operator<=>(const Proxy& lhs, const Proxy& rhs)
+requires(std::three_way_comparable && !std::is_reference_v)
+  {
+return lhs.data <=> rhs.data;
+  };

cjdb wrote:

What is the intention of this change?

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [flang] [compiler-rt] [llvm] [lldb] [clang-tools-extra] [libunwind] [clang] [libcxx] [libc] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via lldb-commits


@@ -0,0 +1,71 @@
+// -*- 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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+#ifndef _LIBCPP___NUMERIC_RANGES_IOTA_H
+#define _LIBCPP___NUMERIC_RANGES_IOTA_H
+
+#include <__algorithm/out_value_result.h>
+#include <__config>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+#include <__utility/as_const.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#  pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 23
+namespace ranges {
+template 
+using iota_result = ranges::out_value_result<_Out, _Tp>;
+
+namespace __ranges_iota {
+struct __iota_fn {
+private:
+  // Private helper function
+  template 
+  _LIBCPP_HIDE_FROM_ABI static constexpr iota_result<_Out, _Tp> 
__iota_impl(_Out __first, _Sent __last, _Tp __value) {
+while (__first != __last) {
+  *__first = std::as_const(__value);
+  ++__first;
+  ++__value;
+}
+return {std::move(__first), std::move(__value)};
+  }

cjdb wrote:

Please move this into the iterator-based `operator()` and have the range-based 
one call that. As it's currently implemented, additional and unnecessary moves 
need to happen, and we also incur some debug overhead that I'd rather avoid.

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [compiler-rt] [lldb] [llvm] [libunwind] [clang-tools-extra] [libcxx] [libc] [clang] [flang] [libc++] Implement ranges::iota (PR #68494)

2024-01-09 Thread Christopher Di Bella via lldb-commits


@@ -0,0 +1,54 @@
+// -*- 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: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+#ifndef _LIBCPP___NUMERIC_RANGES_IOTA_H
+#define _LIBCPP___NUMERIC_RANGES_IOTA_H
+
+#include <__algorithm/out_value_result.h>
+#include <__config>
+#include <__ranges/concepts.h>
+#include <__utility/as_const.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#  pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 23
+namespace ranges {
+template 
+using iota_result = ranges::out_value_result<_Out, _Tp>;
+
+struct __iota_fn {
+  template  _Sent, 
weakly_incrementable _Tp>
+requires indirectly_writable<_Out, const _Tp&>
+  constexpr iota_result<_Out, _Tp> operator()(_Out __first, _Sent __last, _Tp 
__value) const {
+while (__first != __last) {
+  *__first = std::as_const(__value);
+  ++__first;
+  ++__value;
+}
+return {std::move(__first), std::move(__value)};
+  }
+
+  template  _Range>
+  constexpr iota_result, _Tp> 
operator()(_Range&& __r, _Tp __value) const {
+return (*this)(ranges::begin(__r), ranges::end(__r), std::move(__value));

cjdb wrote:

I don't see why this would cause problems?

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [compiler-rt] [lldb] [llvm] [libunwind] [clang-tools-extra] [libcxx] [libc] [clang] [flang] [libc++] Implement ranges::iota (PR #68494)

2024-01-09 Thread Christopher Di Bella via lldb-commits


@@ -1149,9 +1171,11 @@ struct Proxy {
   // Calling swap(Proxy{}, Proxy{}) would fail (pass prvalues)
 
   // Compare operators are defined for the convenience of the tests
-  friend constexpr bool operator==(const Proxy&, const Proxy&)
-requires (std::equality_comparable && !std::is_reference_v)
-  = default;
+  friend constexpr bool operator==(const Proxy& lhs, const Proxy& rhs)
+requires(std::equality_comparable && !std::is_reference_v)
+  {
+return lhs.data == rhs.data;
+  };

cjdb wrote:

Understood, I didn't realise that references implicitly delete defaulted 
comparison operators (it makes sense to me that they do). Could you please 
provide a comment about why this is required (same as below)?

https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] c874dd5 - [llvm][clang][NFC] updates inline licence info

2021-08-10 Thread Christopher Di Bella via lldb-commits

Author: Christopher Di Bella
Date: 2021-08-11T02:48:53Z
New Revision: c874dd53628db8170d4c5ba3878817abc385a695

URL: 
https://github.com/llvm/llvm-project/commit/c874dd53628db8170d4c5ba3878817abc385a695
DIFF: 
https://github.com/llvm/llvm-project/commit/c874dd53628db8170d4c5ba3878817abc385a695.diff

LOG: [llvm][clang][NFC] updates inline licence info

Some files still contained the old University of Illinois Open Source
Licence header. This patch replaces that with the Apache 2 with LLVM
Exception licence.

Differential Revision: https://reviews.llvm.org/D107528

Added: 


Modified: 
clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h
clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp
clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h
clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp
clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h
clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.cpp
clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h
clang/include/clang/AST/ASTConcept.h
clang/include/clang/AST/ASTImporterSharedState.h
clang/include/clang/AST/CurrentSourceLocExprScope.h
clang/include/clang/AST/JSONNodeDumper.h
clang/include/clang/Sema/SemaConcept.h
clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
clang/lib/AST/ASTConcept.cpp
clang/lib/Format/MacroExpander.cpp
clang/lib/Format/Macros.h
clang/lib/Index/FileIndexRecord.cpp
clang/lib/Sema/SemaConcept.cpp
clang/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
clang/unittests/Format/TestLexer.h
clang/unittests/Tooling/RecursiveASTVisitorTests/LambdaTemplateParams.cpp
lldb/docs/use/python.rst
lldb/unittests/Symbol/TestLineEntry.cpp
llvm/include/llvm/Analysis/HeatUtils.h
llvm/include/llvm/CodeGen/MIRFormatter.h
llvm/include/llvm/CodeGen/RegAllocCommon.h
llvm/include/llvm/Support/ExtensibleRTTI.h
llvm/include/llvm/Support/LICENSE.TXT
llvm/include/llvm/Support/Signposts.h
llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h
llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
llvm/include/llvm/Transforms/Instrumentation/InstrOrderFile.h
llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
llvm/include/llvm/Transforms/Utils/MemoryOpRemark.h
llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
llvm/lib/Analysis/HeatUtils.cpp
llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp
llvm/lib/Analysis/TFUtils.cpp
llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp
llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
llvm/lib/DebugInfo/GSYM/FileWriter.cpp
llvm/lib/DebugInfo/GSYM/Range.cpp
llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
llvm/lib/ExecutionEngine/JITLink/ELF.cpp
llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp
llvm/lib/ExecutionEngine/JITLink/MachO.cpp
llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp
llvm/lib/Support/ExtensibleRTTI.cpp
llvm/lib/Support/Signposts.cpp
llvm/lib/Target/AArch64/AArch64StackTagging.cpp
llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp
llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.h
llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFStreamer.cpp
llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFStreamer.h
llvm/lib/Target/X86/X86InstrKL.td
llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp
llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
llvm/unittests/BinaryFormat/MsgPackDocumentTest.cpp
llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
llvm/unittests/Support/ExtensibleRTTITest.cpp

Removed: 




diff  --git a/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp 
b/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
index 9b449515f27da..86e3f3b7da6a2 100644
--- a/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
@@ -1,9 +1,8 @@
 //===--- BranchCloneCheck.cpp - clang-tidy 
===//
 //
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illi