@@ -108,6 +108,11 @@ Changes in existing checks
` check to
remove `->`, when reduntant `get()` is removed.
+- Improved :doc:`readablility-implicit-bool-conversion
+ ` check
carlosgalvezp wrote:
Improved... by adding the option `UseUpperCaseLiteralSuffix`
@@ -108,6 +108,11 @@ Changes in existing checks
` check to
remove `->`, when reduntant `get()` is removed.
+- Improved :doc:`readablility-implicit-bool-conversion
+ ` check
+ Added option `UseUpperCaseLiteralSuffix` to to select the
carlosgalvezp wrote:
@@ -133,3 +133,17 @@ Options
When `true`, the check will allow conditional pointer conversions. Default
is `false`.
+
+.. option:: UseUpperCaseLiteralSuffix
+
+ When `true`, the replacements will use an uppercase literal suffix in the
+ provided fixes. Default a low
@@ -133,3 +133,17 @@ Options
When `true`, the check will allow conditional pointer conversions. Default
is `false`.
+
+.. option:: UseUpperCaseLiteralSuffix
+
+ When `true`, the replacements will use an uppercase literal suffix in the
+ provided fixes. Default a low
https://github.com/carlosgalvezp edited
https://github.com/llvm/llvm-project/pull/102831
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp commented:
LGTM, very minor nits!
https://github.com/llvm/llvm-project/pull/102831
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp approved this pull request.
LGTM, maybe give a couple more days for other reviewers in case they have more
comments.
https://github.com/llvm/llvm-project/pull/104882
___
cfe-commits mailing list
cfe-commits@lists.llvm.
https://github.com/carlosgalvezp approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/104882
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heide
carlosgalvezp wrote:
I'm not sure I understand this change. `std::span` is not a replacement for a C
array, since it does not own memory. I don't understand also the change from
suggesting to use `std::vector` instead of `std::array`
https://github.com/llvm/llvm-project/pull/108555
___
@@ -1,9 +1,9 @@
-// RUN: %check_clang_tidy %s modernize-avoid-c-arrays %t -- \
+// RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \
// RUN: -config='{CheckOptions: { modernize-avoid-c-arrays.AllowStringArrays:
true }}'
const char name[] = "name";
const
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/108083
>From cb4ea5f12c72dd547d6ae3e742e99d717289344e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Tue, 10 Sep 2024 13:46:51 +
Subject: [PATCH] [clang-tidy] Create bugprone-bit-cast-p
@@ -0,0 +1,32 @@
+//===--- BitCastPointersCheck.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: Apa
@@ -0,0 +1,32 @@
+//===--- BitCastPointersCheck.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: Apa
@@ -0,0 +1,32 @@
+//===--- BitCastPointersCheck.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: Apa
@@ -0,0 +1,34 @@
+//===--- BitCastPointersCheck.h - clang-tidy *- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/carlosgalvezp edited
https://github.com/llvm/llvm-project/pull/108083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
Thanks for the clarifications, will address asap!
It now comes to mind that we probably also want to check `memcpy(ptr, ptr)`,
which is equivalent to `bit_cast`. In that case I wonder if the check name
still holds or it should be named something else?
https://github.com/
@@ -10,29 +10,32 @@ modernize-avoid-c-arrays
Finds C-style array types and recommend to use ``std::array<>`` /
``std::vector<>``. All types of C arrays are diagnosed.
+For parameters of incomplete C-style array type, it would be better to
+use ``std::span`` / ``gsl::span`` as
@@ -1,9 +1,9 @@
-// RUN: %check_clang_tidy %s modernize-avoid-c-arrays %t -- \
+// RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \
// RUN: -config='{CheckOptions: { modernize-avoid-c-arrays.AllowStringArrays:
true }}'
const char name[] = "name";
const
@@ -1,9 +1,9 @@
-// RUN: %check_clang_tidy %s modernize-avoid-c-arrays %t -- \
+// RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \
// RUN: -config='{CheckOptions: { modernize-avoid-c-arrays.AllowStringArrays:
true }}'
const char name[] = "name";
const
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/112283
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
Thank you for the contribution! I've added [NFC] (non functional change) to
the commit message title.
https://github.com/llvm/llvm-project/pull/112283
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org
carlosgalvezp wrote:
Please note: GCC is more strict; for std::memset, it requires the type to be
trivial, not just trivially copyable:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107361
I haven't looked at the patch in detail but for consistency with GCC it should
also support suppressing t
carlosgalvezp wrote:
> ACK. Not a standard requirement though, is it?
Correct, it's only UB on non-trivially-copyable. My point was more about if we
want to be consistent with GCC or not. I don't have any strong opinion on that.
https://github.com/llvm/llvm-project/pull/111434
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
_LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
_Alias __val;
- __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+ __builtin_memcpy(&__val,
reinterpret_cast(std::_
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/108083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
@@ -3538,6 +3538,11 @@ TEST_F(TokenAnnotatorTest, TemplateInstantiation) {
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
EXPECT_TOKEN(Tokens[2], tok::less, TT_TemplateOpener);
EXPECT_TOKEN(Tokens[6], tok::greater, TT_TemplateCloser);
+
+ Tokens = annotate("return std::conditi
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/108083
>From 1b1d54e0ce0d0bc4250ff045840b0a0a7bac59a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Tue, 10 Sep 2024 13:46:51 +
Su
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/108083
>From 1b1d54e0ce0d0bc4250ff045840b0a0a7bac59a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Tue, 10 Sep 2024 13:46:51 +
Su
carlosgalvezp wrote:
What about `bugprone-bitwise-pointer-copy`?
https://github.com/llvm/llvm-project/pull/108083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp approved this pull request.
Thanks for the fix!
https://github.com/llvm/llvm-project/pull/111405
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
_LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
_Alias __val;
- __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+ __builtin_memcpy(&__val, static_cast(std::__to_ad
https://github.com/carlosgalvezp edited
https://github.com/llvm/llvm-project/pull/111434
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
_LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
_Alias __val;
- __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+ __builtin_memcpy(&__val, static_cast(std::__to_ad
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
_LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
_Alias __val;
- __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+ __builtin_memcpy(&__val, static_cast(std::__to_ad
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/108083
>From 1b1d54e0ce0d0bc4250ff045840b0a0a7bac59a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Tue, 10 Sep 2024 13:46:51 +
Subject: [PATCH] [clang-tidy] Create bugprone-bitwise-po
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/108083
>From 7c50e702c087047adfe43137d52e56cb98ff9918 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Tue, 10 Sep 2024 13:46:51 +
Subject: [PATCH] [clang-tidy] Create bugprone-bitwise-po
https://github.com/carlosgalvezp edited
https://github.com/llvm/llvm-project/pull/108083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp edited
https://github.com/llvm/llvm-project/pull/108083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
> Both sound good to me.
Great, updated! Let me know there's anything else to fix or if we can merge.
https://github.com/llvm/llvm-project/pull/108083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
_LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
_Alias __val;
- __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+ __builtin_memcpy(&__val, static_cast(std::__to_ad
https://github.com/carlosgalvezp approved this pull request.
https://github.com/llvm/llvm-project/pull/112162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
@njriasan Thanks for the contribution! I see the commit message would include
this:
```
Co-authored-by: Nicholas Riasanovsky
```
Do you want to keep that?
https://github.com/llvm/llvm-project/pull/112162
___
cfe-commits mailin
carlosgalvezp wrote:
> @carlosgalvezp That message is because I got a new computer and it wasn't
> properly setup yet. I would like to remove it if possible. What is the
> process for updating a commit message in this repo? Should I just force push
> a modified message to this branch?
I'm not
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
_LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
_Alias __val;
- __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+ __builtin_memcpy(&__val, static_cast(std::__to_ad
@@ -102,7 +102,7 @@ struct __aliasing_iterator_wrapper {
_LIBCPP_HIDE_FROM_ABI _Alias operator*() const _NOEXCEPT {
_Alias __val;
- __builtin_memcpy(&__val, std::__to_address(__base_), sizeof(value_type));
+ __builtin_memcpy(&__val, static_cast(std::__to_ad
@@ -670,6 +670,8 @@ namespace MemcpyEtc {
constexpr bool test_address_of_incomplete_struct_type() { // expected-error
{{never produces a constant}}
struct Incomplete;
extern Incomplete x, y;
+// expected-warning@+2 {{destination for call to '__builtin_memcpy' is
carlosgalvezp wrote:
> (@ tidy developers: what would you prefer?)
I agree!
https://github.com/llvm/llvm-project/pull/114715
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp requested changes to this pull request.
Relying on Google-test internal implementation details that are outside of our
control and may change at any point in time does not feel good.
The patch should instead fix the root cause of the problem.
https://github.co
carlosgalvezp wrote:
A quick middle-point solution is to add an option to allow ignoring code that
is executed from within macros, or even
allow the user to specify which macros to ignore.
https://github.com/llvm/llvm-project/pull/115051
___
cfe-comm
carlosgalvezp wrote:
Perhaps this has been discussed before, but I think the part about "add qt
module" should be added on a separate patch, since adding a brand-new tidy
module is a rather big thing.
So this patch could be only about adding the `modernize` check, and a follow-up
patch could
carlosgalvezp wrote:
> I think `modernize-use-starts-ends-with` should be extended instead.
Agreed!
https://github.com/llvm/llvm-project/pull/116033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
@@ -19,75 +19,87 @@ AST_MATCHER(FieldDecl, isMemberOfLambda) {
return Node.getParent()->isLambda();
}
-struct MemberFunctionInfo {
- bool Declared{};
- bool Deleted{};
-};
-
-struct MemberFunctionPairInfo {
- MemberFunctionInfo Copy{};
- MemberFunctionInfo Move{};
-};
-
carlosgalvezp wrote:
Friendly ping, let me know if there's anything else that should be addressed!
https://github.com/llvm/llvm-project/pull/108083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/109404
>From 96ee182c19926a40331430a661bd959066e56bf9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Fri, 20 Sep 2024 11:32:07 +
Subject: [PATCH] [clang][NFC] Fix example code for membe
@@ -0,0 +1,45 @@
+//===--- BitCastPointersCheck.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: Apa
carlosgalvezp wrote:
Great!
https://github.com/llvm/llvm-project/pull/109404
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/108083
>From 467b454a07e22437958832d306ae2c4b67c372ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Tue, 10 Sep 2024 13:46:51 +
Subject: [PATCH] [clang-tidy] Create bugprone-bit-cast-p
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/108083
>From c107a956e8fc27fd35f9a840e59ea748aac03586 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Tue, 10 Sep 2024 13:46:51 +
Subject: [PATCH] [clang-tidy] Create bugprone-bit-cast-p
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/109404
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
> > It now comes to mind that we probably also want to check `memcpy(ptr,
> > ptr)`, which is equivalent to `bit_cast`. In that case I wonder if the
> > check name still holds or it should be named something else?
>
> Yeah, with the addition of `memcpy`, the `bit` part of
carlosgalvezp wrote:
> But the template mark is really hard to understand
I agree. Did you intend to remove that in this commit as well? I see it's still
present.
https://github.com/llvm/llvm-project/pull/109068
___
cfe-commits mailing list
cfe-commi
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
https://github.com/carlosgalvezp created
https://github.com/llvm/llvm-project/pull/109403
The example code doesn't compile otherwise.
>From 6916d5ecdc327b2771fbbca226095bd99d394dab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lv
https://github.com/carlosgalvezp created
https://github.com/llvm/llvm-project/pull/109404
The example code doesn't compile otherwise.
>From f598e98d4deb66a313b7f944cb96df04bc4b91a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Fri, 20 Sep 2024 11:32:07 +
Subject: [P
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/109403
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
carlosgalvezp wrote:
> > Why isn't `misc` suitable for this use case?
>
> `bugprone` was just an initial thought. If the group think leads us to `misc`
> I'm ok with moving in that direction. Other thoughts?
Maybe i misunderstood, I thought you meant creating a new clang-tidy module
called `a
carlosgalvezp wrote:
> creation of an advisory group.
Why isn't `misc` suitable for this use case? It would be confusing to have both
groups I think, and may lead to bike-shedding discussions in the future about
where a check belongs in misc or advisory.
https://github.com/llvm/llvm-project/p
@@ -3538,6 +3538,11 @@ TEST_F(TokenAnnotatorTest, TemplateInstantiation) {
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
EXPECT_TOKEN(Tokens[2], tok::less, TT_TemplateOpener);
EXPECT_TOKEN(Tokens[6], tok::greater, TT_TemplateCloser);
+
+ Tokens = annotate("return std::conditi
https://github.com/carlosgalvezp approved this pull request.
LGTM, thanks for splitting the patch!
Personally I don't quite see the added value of having the quotes, I actually
find them a bit noisy. It would have been good to write the motivation for this
change in the commit message.
But th
carlosgalvezp wrote:
> we're not (fully) understanding the content
My thinking was that we don't even need to understand the content, we simply
exclude code that is contained within any of the problematic public macros.
This sounds like it should be possible to do? Unfortunately I don't know t
https://github.com/carlosgalvezp created
https://github.com/llvm/llvm-project/pull/115302
Fixes #115055
>From c6ad9d042612c63cb9862782f17082e07277fc2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Wed, 6 Nov 2024 08:52:06 +
Subject: [PATCH] Fix false positive in bug
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/115138
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp created
https://github.com/llvm/llvm-project/pull/115138
Fixes #115055
>From 0f94715df89ef0860ed3f6b74bbbd3cd71c0b102 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Wed, 6 Nov 2024 08:52:06 +
Subject: [PATCH] Fix false positive in bug
carlosgalvezp wrote:
Not sure how to re-run the failed jobs, maybe the force-push broke them. Will
open a new PR, sorry for the trouble!
https://github.com/llvm/llvm-project/pull/115138
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://l
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/115138
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp reopened
https://github.com/llvm/llvm-project/pull/115138
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/115138
>From c6ad9d042612c63cb9862782f17082e07277fc2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Wed, 6 Nov 2024 08:52:06 +
Subject: [PATCH] Fix false positive in bugprone-throw-key
carlosgalvezp wrote:
> but these are not internal implementation details - these are key elements of
> the public API
In the unit test, you have copied internal code from here:
https://github.com/google/googletest/blob/d144031940543e15423a25ae5a8a74141044862f/googletest/include/gtest/internal/
carlosgalvezp wrote:
```cpp
auto sub2 = s.subspan(n);// transforms to: auto sub2 = s.last(s.size()
- n);
```
IMHO the transformed code is less readable. It would be more useful to do the
opposite transformation, maybe that's what you intended?
```cpp
auto sub2 = s.subspan(s.size() - n
@@ -0,0 +1,40 @@
+//===--- UseSpanFirstLastCheck.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: Apach
carlosgalvezp wrote:
> not sure if this is a readability or a modernize check
`readability`. `modernize` is for using new features from newer standards.
https://github.com/llvm/llvm-project/pull/118074
___
cfe-commits mailing list
cfe-commits@lists.l
carlosgalvezp wrote:
For future reference, `modernize` is typically related to new features of new
C++ standards, so this check wouldn't quite fit there. Great that you found an
existing check that suits your needs!
https://github.com/llvm/llvm-project/pull/118033
_
carlosgalvezp wrote:
My understanding of the guidelines is that the purpose of this rule is to avoid
data loss (truncation) due to narrowing. In that sense, isn't this still a
problem in C++20?
Whether it well-defined behavior in C++20 or implementation-defined behavior
pre-C++20 does not se
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/115302
>From c6ad9d042612c63cb9862782f17082e07277fc2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Wed, 6 Nov 2024 08:52:06 +
Sub
Carlos =?utf-8?q?Gálvez?=
Message-ID:
In-Reply-To:
https://github.com/carlosgalvezp closed
https://github.com/llvm/llvm-project/pull/115302
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
carlosgalvezp wrote:
Apologies for the late response, I don't have much time to perform in-depth
reviews. Tagging additional reviewers @5chmidti @HerrCai0907
https://github.com/llvm/llvm-project/pull/115051
___
cfe-commits mailing list
cfe-commits@l
https://github.com/carlosgalvezp approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/115180
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
carlosgalvezp wrote:
> since we have already allow the to unsigned cast later
I'm not sure I follow, could you point me to an example of this?
When implementing guidelines, we must make sure we implement exactly what the
guidelines say, and not make them less restrictive (at least not by de
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/108083
>From d7eacb7d6614b374a959c33a7394f2652df32982 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Tue, 10 Sep 2024 13:46:51 +
Subject: [PATCH] [clang-tidy] Create bugprone-bit-cast-p
https://github.com/carlosgalvezp updated
https://github.com/llvm/llvm-project/pull/108083
>From c9e69b58e6c3e27fc6dd529783c02fec8fafbd9a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20G=C3=A1lvez?=
Date: Tue, 10 Sep 2024 13:46:51 +
Subject: [PATCH] [clang-tidy] Create bugprone-bit-cast-p
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heide
=��___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=��___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=��___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=��___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heide
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heide
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heidekrüger?= ,
Paul =?utf-8?q?Heide
carlosgalvezp wrote:
Nit tip: the additional `fixup!` in the commit message for each additional
commit is rather distracting, it would be best if each commit were be named
after the changes it introduces w.r.t. the previous commit.
https://github.com/llvm/llvm-project/pull/113144
201 - 300 of 474 matches
Mail list logo