[clang-tools-extra] [clang-tidy] Rename out-of-line function definitions (PR #91954)

2024-05-16 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: A bit late for the review but would have been nice to name the test "out-of-line" instead of "ool", so it's easier to understand what it's about. https://github.com/llvm/llvm-project/pull/91954 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-13 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: I realize it's probably very hard (if not impossible) to detect whether a class is a base class unless it has virtual functions. That's why the corresponding AUTOSAR rule bans only non-final classes. But that is a bit overkill and leads to some pain.

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-13 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Otherwise since this is a problem also on non-polymorphic objects, maybe "bugprone-pointer-arithmetic-base-class"? https://github.com/llvm/llvm-project/pull/91951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Add `bugprone-virtual-arithmetic` check (PR #91951)

2024-05-13 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: I'm not very happy about the name, there's no such thing as "virtual arithmetic". What about "bugprone-pointer-arithmetic-polymorphic-object"? I rather have a long descriptive name than a short ambiguous name. https://github.com/llvm/llvm-project/pull/91951

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Consider also that this check should probably not apply to variables of type `auto`, see AUTOSAR rule A8-5-3. https://github.com/llvm/llvm-project/pull/91124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Add `modernize-use-uniform-initializer` check (PR #91124)

2024-05-05 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Regarding the problem of {} initialization and std::vector, I believe we could restrict this check to not warn on classes that have a constructor taking a `std:: initializer_list`. I believe AUTOSAR has an exception for that.

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-04 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > Should I implement auto-fix for this check? As a first step we can have it without auto-fix and add that as a second step once we figure out a good way to do it. https://github.com/llvm/llvm-project/pull/90830 ___ cfe-commits

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-02 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: - I'm not sure this is so much a readability check, I'd put it in `misc`. The main problem that it solves is avoiding ODR violations. I'd call it `misc-prefer-internal-linkage`. - The auto-fix should be configurable to choose `static` or anonymous namespace.

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-04-25 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Please note: the guidelines do not require one to replace [] with at(), that's just one of the possible solutions. Actually at() is banned in many codebases where exceptions are banned. It would be good to make this fix-it opt-in, configurable via option, so the check

[clang-tools-extra] [clang-tidy] Allow renaming macro arguments (PR #87792)

2024-04-10 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Great! Nothing else from my side https://github.com/llvm/llvm-project/pull/87792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Allow renaming macro arguments (PR #87792)

2024-04-09 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Nice! Should we add this example as a test case? https://github.com/llvm/llvm-project/pull/87792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Allow renaming macro arguments (PR #87792)

2024-04-08 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > the user may not have the ability to change the definition of the macro to be > able to appease the check My understanding of this PR is that the user would only need to change what they pass into the macro, not the macro itself, or? E.g. ```cpp -MY_MACRO(foo)

[clang-tools-extra] [clang-tidy][NFC] Remove unnecessary nullptr check on cast subexpr (PR #85473)

2024-03-16 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Shouldn't we simply `return`? As you say, the assert is disabled in Release mode. Even if it's enabled, the author if `getSubExpr` may one day decide to remove the assert without possibly knowing all the places that do rely on that assert, leaving the code unprotected.

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-21 Thread Carlos Galvez via cfe-commits
@@ -97,6 +97,9 @@ The improvements are... Improvements to clang-tidy -- +- Improved :program:`run-clang-tidy.py` script. Added argument `-source-filter` + to filter out source files from the compilation database. carlosgalvezp wrote:

[clang-tools-extra] [run-clang-tidy.py] Add option to ignore source files from compilation database (PR #82416)

2024-02-20 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > Why "ignore" instead of "filter"? Why can't we make "filter" use a full regex that supports negative expressions instead? https://github.com/llvm/llvm-project/pull/82416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy][readability-identifier-naming] Resolve symlinks for checking style for file (PR #81985)

2024-02-16 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: This problem seems like it should be handled globally, not in a single specific check. IIUC any check that reads options from the .cñsng-tidy file is affected. What build system are you using, bazel? We use it and don't have any problems. If your build system creates a

[clang-tools-extra] [clang-tidy] Remove check-specific HeaderFileExtensions and Implement… (PR #80333)

2024-02-02 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/80333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Remove check-specific HeaderFileExtensions and Implement… (PR #80333)

2024-02-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/80333 >From b40347c8025b0d5de83453012a76d412c07f54a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Thu, 1 Feb 2024 20:00:45 +

[clang-tools-extra] [clang-tidy] Remove enforcement of rule C.48 from cppcoreguidelines-prefer-member-init (PR #80330)

2024-02-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/80330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Remove check-specific HeaderFileExtensions and Implement… (PR #80333)

2024-02-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/80333 >From fbb0837342a566ff928b211cbb418075a7e744fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Thu, 1 Feb 2024 20:00:45 +

[clang-tools-extra] [clang-tidy] Remove check-specific HeaderFileExtensions and Implement… (PR #80333)

2024-02-01 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/80333 …ationFileExtensions Deprecated since clang-tidy 17. Use the corresponding global options instead. Fixes #61947 >From fbb0837342a566ff928b211cbb418075a7e744fe Mon Sep 17 00:00:00 2001 From:

[clang-tools-extra] [clang-tidy] Remove enforcement of rule C.48 from cppcoreguidelines-prefer-member-init (PR #80330)

2024-02-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/80330 This functionality already exists in cppcoreguidelines-use-default-member-init. It was deprecated from this check in clang-tidy 17. This allows us to

[clang-tools-extra] [clang-tidy] Remove enforcement of rule C.48 from cppcoreguidelines-p… (PR #80193)

2024-02-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/80193 >From bfa4ea36a2695ec8d6ea92db588f91d5c818968a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed, 31 Jan 2024 20:25:27 +

[clang-tools-extra] [clang-tidy] Remove enforcement of rule C.48 from cppcoreguidelines-p… (PR #80193)

2024-02-01 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Thanks for the review! I agree, check names are not the best. It's a bit of a hassle to change them though :/ I will fix the comment about the release notes tonight :+1: https://github.com/llvm/llvm-project/pull/80193 ___

[clang-tools-extra] [clang-tidy] Remove enforcement of rule C.48 from cppcoreguidelines-p… (PR #80193)

2024-01-31 Thread Carlos Galvez via cfe-commits
@@ -230,139 +197,99 @@ void PreferMemberInitializerCheck::check( updateAssignmentLevel(Field, InitValue, Ctor, AssignedFields); if (!canAdvanceAssignment(AssignedFields[Field])) continue; -const bool IsInDefaultMemberInitializer = -

[clang-tools-extra] [clang-tidy] Remove enforcement of rule C.48 from cppcoreguidelines-p… (PR #80193)

2024-01-31 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/80193 …refer-member-init This functionality already exists in cppcoreguidelines-use-default-member-init. It was deprecated from this check in clang-tidy 17. This allows us to fully decouple this check from the

[clang-tools-extra] [llvm] [clang] [clang-tidy] Remove cert-dcl21-cpp check (PR #80181)

2024-01-31 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/80181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [clang-tidy] Remove cert-dcl21-cpp check (PR #80181)

2024-01-31 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: The code formatting job seems to produce incorrect changes. https://github.com/llvm/llvm-project/pull/80181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [clang-tidy] Remove cert-dcl21-cpp check (PR #80181)

2024-01-31 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/80181 Deprecated since clang-tidy 17. The rule DCL21-CPP has been removed from the CERT guidelines, so it does not make sense to keep the check. Fixes #42788 >From fdb65ef4805152ad143a120e343d696f8b08d3db Mon

[clang-tools-extra] Add new check: do not return 0; at the end of main() in C++ (PR #77586)

2024-01-10 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Thanks for understanding @11happy ! As you say the learning experience is invaluable and will be very useful for the next check. All contributions are greatly appreciated :) I can recommend you look into fairly recent issues - older issues may not have been reviewed

[clang-tools-extra] Add new check: do not return 0; at the end of main() in C++ (PR #77586)

2024-01-10 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: I agree with the opinions from Aaron And Piotr above - this check does the opposite of readability: it forces people to waste time digging into the Standard to find the quote that says the return is not needed. Could some argumentation be provided as to why this would be

[clang-tools-extra] [clang-tidy] Add new performance-use-starts-ends-with check (PR #72385)

2023-11-30 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Apologies for the late reply, need to fix my mail filter so I don't miss the notifications! IMHO either modernize or readability are suitable categories. Performance can vary/be negligible depending on context I suppose? https://github.com/llvm/llvm-project/pull/72385

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-10-14 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/67528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-10-14 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/67528 >From 08b5c95bea5b7bfceeae6dfc4deac764faff87a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed, 27 Sep 2023 08:07:01 +

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-10-13 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= Message-ID: In-Reply-To: carlosgalvezp wrote: Friendly ping @AaronBallman @shafik https://github.com/llvm/llvm-project/pull/67528 ___ cfe-commits mailing list

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-10-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: carlosgalvezp wrote: It seems checks are broken on trunk, I see commits merged with failing pre-merge tests. They seem to be unrelated to this patch though. Is there anything else you'd like fixed before merging?

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-10-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/67528 >From 7a70366e08f2c2f1181bb74f7716d8b1e3f1b62e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed,

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-09-27 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp resolved https://github.com/llvm/llvm-project/pull/67528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-09-27 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: carlosgalvezp wrote: I would need some help with the failing pre-merge test, I don't really understand why that failure would be related to this patch... https://github.com/llvm/llvm-project/pull/67528

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-09-27 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/67528 >From f9c4fb4e0a5a9017da6214fb0d98f45f89ee16be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed,

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-09-27 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: @@ -405,7 +405,8 @@ def warn_fixedpoint_constant_overflow : Warning< InGroup>; def warn_constexpr_unscoped_enum_out_of_range : Warning< "integer value %0 is outside the valid range of values [%1, %2] for the " -

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-09-27 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/67528 >From f9c4fb4e0a5a9017da6214fb0d98f45f89ee16be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed, 27 Sep 2023 08:07:01 +

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-09-27 Thread Carlos Galvez via cfe-commits
@@ -405,7 +405,8 @@ def warn_fixedpoint_constant_overflow : Warning< InGroup>; def warn_constexpr_unscoped_enum_out_of_range : Warning< "integer value %0 is outside the valid range of values [%1, %2] for the " - "enumeration type %3">, DefaultError, InGroup>; +

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-09-27 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/67528 …macros As per review comments on https://reviews.llvm.org/D150226, we should allow for one more release before turning this warning into a hard error, by making it visible in system headers and macros,

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #67170)

2023-09-23 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Thanks @shafik , I wasn't aware! I will then close this PR and continue the discussion on Phab. https://github.com/llvm/llvm-project/pull/67170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #67170)

2023-09-23 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/67170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #67170)

2023-09-22 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Not sure what happens with the failed job in CI, I rebased on latest trunk and ran the entire `ninja check-clang` suite and it passed successfully. Do I need some special CMake configuration flag to enable the failing test? About the patch itself - casting outside of

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2023-09-22 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: To clarify, I'm not concerned about performance, but with code readability and maintainability. I realize the chain that I wrote above should not lead to recursion due to `SkipMethods::Yes` in the relevant call. I'd like to take a closer look at the problem, would you

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #67170)

2023-09-22 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/67170 Casting an int into an enum is undefined behavior if the int is outside of the range of the enum. UB is not allowed in constant expressions, therefore the compiler must produce a hard error in that case.

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2023-09-21 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Being totally unfamiliar with the code, I have a feeling that we shouldn't be fixing in the `analyze` function. `analyze` has 1 single responsibility: wrap `analyzeImpl` in order to add cacheability for performance reasons, and it does so simply and well, and it does

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM, thanks for the fix and the great cleanup! https://github.com/llvm/llvm-project/pull/66835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Carlos Galvez via cfe-commits
@@ -729,3 +729,21 @@ struct forward_declared_as_struct; class forward_declared_as_struct { }; +namespace pr55156 { + +typedef enum { + VALUE0, + VALUE1, +} ValueType; +// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: invalid case style for typedef 'ValueType'

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp resolved https://github.com/llvm/llvm-project/pull/66835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Carlos Galvez via cfe-commits
@@ -729,3 +729,21 @@ struct forward_declared_as_struct; class forward_declared_as_struct { }; +namespace pr55156 { + +typedef enum { + VALUE0, + VALUE1, +} ValueType; +// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: invalid case style for typedef 'ValueType'

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2023-09-17 Thread Carlos Galvez via cfe-commits
@@ -207,11 +211,13 @@ void UseEmplaceCheck::registerMatchers(MatchFinder *Finder) { auto HasConstructExpr = has(ignoringImplicit(SoughtConstructExpr)); // allow for T{} to be replaced, even if no CTOR is declared - auto HasConstructInitListExpr = has(initListExpr(anyOf(

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2023-09-17 Thread Carlos Galvez via cfe-commits
@@ -207,11 +211,13 @@ void UseEmplaceCheck::registerMatchers(MatchFinder *Finder) { auto HasConstructExpr = has(ignoringImplicit(SoughtConstructExpr)); // allow for T{} to be replaced, even if no CTOR is declared - auto HasConstructInitListExpr = has(initListExpr(anyOf(

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2023-09-17 Thread Carlos Galvez via cfe-commits
@@ -1332,6 +1337,17 @@ void testBracedInitTemporaries() { v3.push_back(NonTrivialWithCtor{{}}); v3.push_back({{0}}); v3.push_back({{}}); + + std::vector v4; + + // These should not be noticed or fixed; after the correction, the code won't + // compile. +

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-17 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp commented: Should this change be reflected in the Release Notes? https://github.com/llvm/llvm-project/pull/66504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] The first PR our of many PRs for the "Initialized Class Members" check. (PR #65189)

2023-09-08 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Thanks for the detailed response @adriannistor ! > will soon become a lot of if-then-else blocks. In general the decision as to which checks to have should be based on Coding Guidelines and user-facing experience - not on implementation complexity. In that sense, as a

[clang-tools-extra] [clang-tidy] The first PR our of many PRs for the "Initialized Class Members" check. (PR #65189)

2023-09-08 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,34 @@ +.. title:: clang-tidy - google-cpp-init-class-members + +google-cpp-init-class-members += + +Checks that class members are initialized in constructors (implicitly or +explicitly). Reports constructors or classes where class members

[clang-tools-extra] [clang-tidy] The first PR our of many PRs for the "Initialized Class Members" check. (PR #65189)

2023-09-08 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,34 @@ +.. title:: clang-tidy - google-cpp-init-class-members + +google-cpp-init-class-members += + +Checks that class members are initialized in constructors (implicitly or +explicitly). Reports constructors or classes where class members

[clang-tools-extra] [clang-tidy] Adding an initial version of the "Initialized Class Members" checker. (PR #65189)

2023-09-05 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,32 @@ +.. title:: clang-tidy - google-cpp-init-class-members + +google-cpp-init-class-members += + +Checks that class members are initialized in constructors (implicitly or +explicitly). Reports constructors or classes where class members

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-04 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/65231

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-04 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= https://github.com/carlosgalvezp resolved https://github.com/llvm/llvm-project/pull/65231

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-04 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/65231: >From

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/65231: >From 9c5fec5e31f31b59262646625b7d34f23d57d6cb Mon Sep 17

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= carlosgalvezp wrote: Yes good point, will fix! https://github.com/llvm/llvm-project/pull/65231 ___ cfe-commits mailing

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= carlosgalvezp wrote: Yep, we could certainly change it to C++11 or later, but I think it's out of the scope for this NFC patch. Regarding documentation, I haven't seen that we

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= @@ -3,22 +3,37 @@ modernize-use-equals-delete === -This check marks unimplemented private special member functions with ``= delete``. -To

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/65231: >From 9c5fec5e31f31b59262646625b7d34f23d57d6cb Mon Sep 17 00:00:00 2001 From:

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/65231: >From 9c5fec5e31f31b59262646625b7d34f23d57d6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date:

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/65231: >From 9c5fec5e31f31b59262646625b7d34f23d57d6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Sun, 3 Sep 2023 18:24:55 +

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= https://github.com/carlosgalvezp resolved https://github.com/llvm/llvm-project/pull/65231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/65231: >From 9c5fec5e31f31b59262646625b7d34f23d57d6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Sun, 3 Sep 2023 18:24:55 + Subject: [PATCH 1/2]

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/65231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/65231: >From 9c5fec5e31f31b59262646625b7d34f23d57d6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Sun, 3 Sep 2023 18:24:55 + Subject: [PATCH] [clang-tidy][NFC][doc] Improve

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp review_requested https://github.com/llvm/llvm-project/pull/65231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp review_requested https://github.com/llvm/llvm-project/pull/65231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/65231: …-delete So the purpose of the check is more clear. Update examples code to show compliant code. >From 0ffc7aab2f385babd81b57e8116b0433d85cfaf2 Mon Sep 17 00:00:00 2001 From:

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp review_requested https://github.com/llvm/llvm-project/pull/65231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] readability-identifier-naming - fix StructCase and UnionCase in C (PR #65202)

2023-09-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/65202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 2992d08 - [clang-tidy] Do not warn on macros starting with underscore and lowercase letter in bugprone-reserved-identifier

2023-07-30 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-07-30T12:10:48Z New Revision: 2992d084774f44e7626a7d640fe6c30163db450e URL: https://github.com/llvm/llvm-project/commit/2992d084774f44e7626a7d640fe6c30163db450e DIFF: https://github.com/llvm/llvm-project/commit/2992d084774f44e7626a7d640fe6c30163db450e.diff

[clang-tools-extra] b7c6b39 - [clang-tidy] Remove AnalyzeTemporaryDestructors configuration option

2023-07-26 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-07-26T10:26:43Z New Revision: b7c6b39651b3ffdabf0081c45e0455a04a8be992 URL: https://github.com/llvm/llvm-project/commit/b7c6b39651b3ffdabf0081c45e0455a04a8be992 DIFF: https://github.com/llvm/llvm-project/commit/b7c6b39651b3ffdabf0081c45e0455a04a8be992.diff

[clang-tools-extra] b70e6e9 - [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-07-19T12:05:15Z New Revision: b70e6e9681925ad06d9899462b9e43250be53f64 URL: https://github.com/llvm/llvm-project/commit/b70e6e9681925ad06d9899462b9e43250be53f64 DIFF: https://github.com/llvm/llvm-project/commit/b70e6e9681925ad06d9899462b9e43250be53f64.diff

[clang-tools-extra] 0d6d8a8 - [clang-tidy] Fix bugprone-assert-side-effect to actually give warnings

2023-05-09 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-05-09T16:45:02Z New Revision: 0d6d8a853a6ea29b5f461a475a8f8eb7e7ba18e2 URL: https://github.com/llvm/llvm-project/commit/0d6d8a853a6ea29b5f461a475a8f8eb7e7ba18e2 DIFF: https://github.com/llvm/llvm-project/commit/0d6d8a853a6ea29b5f461a475a8f8eb7e7ba18e2.diff

[clang-tools-extra] 26f4762 - [clang-tidy] Support SystemHeaders in .clang-tidy

2023-05-07 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-05-07T16:36:30Z New Revision: 26f476286fbcb5cde51176abb2d3c6c0986bc410 URL: https://github.com/llvm/llvm-project/commit/26f476286fbcb5cde51176abb2d3c6c0986bc410 DIFF: https://github.com/llvm/llvm-project/commit/26f476286fbcb5cde51176abb2d3c6c0986bc410.diff

[clang-tools-extra] b507bda - [clang-tidy] Add alias cppcoreguidelines-use-default-member-init

2023-04-17 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-04-17T06:09:59Z New Revision: b507bda4552347e00197032526c7ab4a80a853c2 URL: https://github.com/llvm/llvm-project/commit/b507bda4552347e00197032526c7ab4a80a853c2 DIFF: https://github.com/llvm/llvm-project/commit/b507bda4552347e00197032526c7ab4a80a853c2.diff

[clang-tools-extra] 4530c3b - [clang-tidy] Fix cppcoreguidelines-narrowing-conversions false positive

2023-04-15 Thread Carlos Galvez via cfe-commits
Author: Nathan James Date: 2023-04-15T15:07:44Z New Revision: 4530c3bc4897f6633577de07b61ceb1bf7e79f50 URL: https://github.com/llvm/llvm-project/commit/4530c3bc4897f6633577de07b61ceb1bf7e79f50 DIFF: https://github.com/llvm/llvm-project/commit/4530c3bc4897f6633577de07b61ceb1bf7e79f50.diff LOG:

[clang-tools-extra] d69c362 - [clang-tidy][NFC] Fix format of header file comment in MisleadingCaptureDefaultByValueCheck.h

2023-04-15 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-04-15T14:49:20Z New Revision: d69c362dfdc09d9b866cbce007e6342c17af2b2a URL: https://github.com/llvm/llvm-project/commit/d69c362dfdc09d9b866cbce007e6342c17af2b2a DIFF: https://github.com/llvm/llvm-project/commit/d69c362dfdc09d9b866cbce007e6342c17af2b2a.diff

[clang-tools-extra] fa3de2e - [clang-tidy][NFC] Improve doc of cppcoreguidelines-misleading-capture-default-by-value

2023-04-15 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-04-15T12:07:18Z New Revision: fa3de2ed2964d18dd0b7457e77416fb4e688c8bd URL: https://github.com/llvm/llvm-project/commit/fa3de2ed2964d18dd0b7457e77416fb4e688c8bd DIFF: https://github.com/llvm/llvm-project/commit/fa3de2ed2964d18dd0b7457e77416fb4e688c8bd.diff

[clang-tools-extra] eedbe81 - [clang-tidy] Apply cppcoreguidelines-avoid-capture-default-when-capturin-this only to by-value capture default

2023-04-15 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-04-15T10:10:04Z New Revision: eedbe81b1c6dfbd85c2a46093e9e862335ad6516 URL: https://github.com/llvm/llvm-project/commit/eedbe81b1c6dfbd85c2a46093e9e862335ad6516 DIFF: https://github.com/llvm/llvm-project/commit/eedbe81b1c6dfbd85c2a46093e9e862335ad6516.diff

[clang-tools-extra] 132f1d3 - [clang-tidy] Support specifying checks as a list in the config file

2023-04-10 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-04-10T19:31:33Z New Revision: 132f1d31fd66c30baf9773bf8f37b36a40fa7039 URL: https://github.com/llvm/llvm-project/commit/132f1d31fd66c30baf9773bf8f37b36a40fa7039 DIFF: https://github.com/llvm/llvm-project/commit/132f1d31fd66c30baf9773bf8f37b36a40fa7039.diff

[clang-tools-extra] 712dfec - [clang-tidy] Deprecate cert-dcl21-cpp

2023-04-05 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-04-05T06:33:40Z New Revision: 712dfec1781db8aa92782b98cac5517db548b7f9 URL: https://github.com/llvm/llvm-project/commit/712dfec1781db8aa92782b98cac5517db548b7f9 DIFF: https://github.com/llvm/llvm-project/commit/712dfec1781db8aa92782b98cac5517db548b7f9.diff

[clang-tools-extra] 2469bd9 - [clang-tidy] Disable misc-definitions-in-headers for declarations in anonymous namespaces

2023-04-01 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-04-01T19:19:00Z New Revision: 2469bd98a77242606426f8a5a8a797054c932bf0 URL: https://github.com/llvm/llvm-project/commit/2469bd98a77242606426f8a5a8a797054c932bf0 DIFF: https://github.com/llvm/llvm-project/commit/2469bd98a77242606426f8a5a8a797054c932bf0.diff

[clang-tools-extra] 4d4c0f9 - [clang-tidy] Add option to ignore capture default by reference in cppcoreguidelines-avoid-capture-default-when-capturing-this

2023-03-28 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-03-28T20:36:34Z New Revision: 4d4c0f9734607bb0423593b060b8fa73c06fe3d3 URL: https://github.com/llvm/llvm-project/commit/4d4c0f9734607bb0423593b060b8fa73c06fe3d3 DIFF: https://github.com/llvm/llvm-project/commit/4d4c0f9734607bb0423593b060b8fa73c06fe3d3.diff

[clang-tools-extra] 556600a - [clang-tidy] Add option to ignore user-defined literals in readability-magic-numbers

2023-03-26 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-03-26T16:41:17Z New Revision: 556600af6a8a7f241277f7a22c3e3746e7b09123 URL: https://github.com/llvm/llvm-project/commit/556600af6a8a7f241277f7a22c3e3746e7b09123 DIFF: https://github.com/llvm/llvm-project/commit/556600af6a8a7f241277f7a22c3e3746e7b09123.diff

[clang-tools-extra] f957b8f - [clang-tidy][NFC] Improve naming convention in google-readability-avoid-underscore-in-googletest-name

2023-03-24 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-03-24T07:22:04Z New Revision: f957b8fe1efe34ac04d1b2e6381e44edcef056b3 URL: https://github.com/llvm/llvm-project/commit/f957b8fe1efe34ac04d1b2e6381e44edcef056b3 DIFF: https://github.com/llvm/llvm-project/commit/f957b8fe1efe34ac04d1b2e6381e44edcef056b3.diff

[clang-tools-extra] b767784 - [clang-tidy][NFC] Fix broken link in Release Notes

2023-03-23 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-03-23T10:30:15Z New Revision: b7677846da66fd003a538f87fd8de948cfcc3d6a URL: https://github.com/llvm/llvm-project/commit/b7677846da66fd003a538f87fd8de948cfcc3d6a DIFF: https://github.com/llvm/llvm-project/commit/b7677846da66fd003a538f87fd8de948cfcc3d6a.diff

[clang-tools-extra] b08d35f - [clang-tidy] Ignore DISABLED_ in test suite name in google-avoid-underscore-in-googletest-name

2023-03-23 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-03-23T08:31:12Z New Revision: b08d35f826a6b7696a02f1d811da7a2f951e74a1 URL: https://github.com/llvm/llvm-project/commit/b08d35f826a6b7696a02f1d811da7a2f951e74a1 DIFF: https://github.com/llvm/llvm-project/commit/b08d35f826a6b7696a02f1d811da7a2f951e74a1.diff

[clang-tools-extra] 7e5c48b - [clang-tidy][NFC] Move avoid-underscore-in-googletest-name to google folder

2023-03-22 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-03-22T18:51:51Z New Revision: 7e5c48b8bd9ff0ee5de3ba28c833f1225f14e44d URL: https://github.com/llvm/llvm-project/commit/7e5c48b8bd9ff0ee5de3ba28c833f1225f14e44d DIFF: https://github.com/llvm/llvm-project/commit/7e5c48b8bd9ff0ee5de3ba28c833f1225f14e44d.diff

  1   2   >