[clang-tools-extra] [clang-apply-replacements] Apply format only if --format is specified (PR #70801)

2023-11-20 Thread Edwin Vane via cfe-commits
revane wrote: Does this PR address a bug I logged? I'm not sure why you've requested my input. https://github.com/llvm/llvm-project/pull/70801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang-tools-extra] [clang-apply-replacements] Apply format only if --format is specified (PR #70801)

2023-11-20 Thread Edwin Vane via cfe-commits
revane wrote: I haven't touched this code in 10 years. I don't think I'm a good candidate for providing a review. https://github.com/llvm/llvm-project/pull/70801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang-tools-extra] Support renaming designated initializers (PR #86976)

2024-03-28 Thread Edwin Vane via cfe-commits
https://github.com/revane created https://github.com/llvm/llvm-project/pull/86976 Until now, they were just ignored by RenamerClangTidyCheck. >From 85539210edf644259bb0dbb1d090e092709a1a1d Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Thu, 28 Mar 2024 09:24:34 -0400 Subject: [PATCH] Support

[clang-tools-extra] Support renaming designated initializers (PR #86976)

2024-04-02 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/86976 >From f8604d450fa3852d5c684bc8ada228a07ce6ccf5 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Thu, 28 Mar 2024 09:24:34 -0400 Subject: [PATCH] Support renaming designated initializers Until now, they were just i

[clang-tools-extra] Support renaming designated initializers (PR #86976)

2024-04-02 Thread Edwin Vane via cfe-commits
@@ -367,6 +367,25 @@ class RenamerClangTidyVisitor return true; } + bool VisitDesignatedInitExpr(DesignatedInitExpr *Expr) { +for (const auto &Designator : Expr->designators()) { + if (!Designator.isFieldDesignator()) +continue; + auto *FieldDecl =

[clang-tools-extra] Support renaming designated initializers (PR #86976)

2024-04-02 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/86976 >From aabdf0019baf4357eb45c6219ff4881b46636e47 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Thu, 28 Mar 2024 09:24:34 -0400 Subject: [PATCH] Support renaming designated initializers Until now, they were just i

[clang-tools-extra] Support renaming designated initializers (PR #86976)

2024-04-02 Thread Edwin Vane via cfe-commits
@@ -367,6 +367,24 @@ class RenamerClangTidyVisitor return true; } + bool VisitDesignatedInitExpr(DesignatedInitExpr *Expr) { +for (const auto &Designator : Expr->designators()) { + if (!Designator.isFieldDesignator()) +continue; + FieldDecl *FD = D

Re: clang-tools-extra code owners

2015-09-02 Thread Edwin Vane via cfe-commits
I don't know of anyone who has a stake in clang-modernize and I probably should be removed from the code-owner role. On 2 September 2015 at 12:48, Manuel Klimek wrote: > I think that basically encodes what the current state is, and we should > have kept that file in a better shape. +Edwin in cas

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

2024-04-05 Thread Edwin Vane via cfe-commits
https://github.com/revane created https://github.com/llvm/llvm-project/pull/87792 Although the identifier-naming.cpp lit test expected macro arguments not to be renamed, the code seemed to already allow it. The code was simply not being exercised because a SourceManager argument wasn't being p

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

2024-04-05 Thread Edwin Vane via cfe-commits
revane wrote: Macros are tricky business and I understand why renaming is not allowed within macros. For the cases in the lit test, the renaming seems safe. Is this generally the case (i.e. those permitted by `clang::tidy::utils::rangeCanBeFixed()`)? What other test cases can we add? Or is th

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

2024-04-08 Thread Edwin Vane via cfe-commits
revane wrote: @AaronBallman What do you think? 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] rename designated initializers (PR #86976)

2024-04-08 Thread Edwin Vane via cfe-commits
revane wrote: @AaronBallman Ready to go? https://github.com/llvm/llvm-project/pull/86976 ___ 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 Edwin Vane via cfe-commits
revane wrote: Indeed. I can add some tests to make sure nested macros aren't affected but my thought was since this change allows renaming _arguments_ (i.e. not the macro parameters) then it was safe since the code is not really "inside a macro". There are already other means to filter out sys

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

2024-04-09 Thread Edwin Vane via cfe-commits
revane wrote: Using the suggested code and this one usage: ``` MY_MACRO(myglob); ``` No suggestion is made. My understanding is because the full range of the NamedDecl would contain `awesome_myglob` which isn't entirely within a macro arg. https://github.com/llvm/llvm-project/pull/87792 __

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

2024-04-09 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/87792 >From b34156654bfa937b180eaad1061e38c10a799235 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Fri, 5 Apr 2024 11:06:01 -0400 Subject: [PATCH] [clang-tidy] Allow renaming macro arguments Although the identifier-n

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

2024-04-09 Thread Edwin Vane via cfe-commits
revane wrote: Already done. Unless you had something else in mind? 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] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-09 Thread Edwin Vane via cfe-commits
https://github.com/revane created https://github.com/llvm/llvm-project/pull/88186 Makes it possible to export fixes from running llvm-lit on a clang-tidy test. To enable, modify the RUN invocation directly in the test with the new -export flag. llvm-lit will report the test passed and fixes ca

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-09 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From 631ac048e4b8fcbc242be54f48e5bf432a6a5b3d Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

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

2024-04-09 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/87792 >From c354f7f0be526fe41a56198c5d0ca434a8ad0bfe Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Fri, 5 Apr 2024 11:06:01 -0400 Subject: [PATCH] [clang-tidy] Allow renaming macro arguments Although the identifier-n

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-10 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From bc5071c54e825d7036b6a54f4dfa02268e3a5c72 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-10 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From 91d07d734c92ee807bc804c2d08374771cae8c0a Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

[clang-tools-extra] [clang-tidy] Simplify RenamerClangTidyCheck API (PR #88268)

2024-04-10 Thread Edwin Vane via cfe-commits
https://github.com/revane created https://github.com/llvm/llvm-project/pull/88268 Some functions allow a null SourceManager, no SourceManager, or a SourceManager in an inconsistent argument position. Since SourceManager is generally not null and it doesn't make sense to apply renaming without

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-10 Thread Edwin Vane via cfe-commits
revane wrote: @PiotrZSL @carlosgalvezp @LegalizeAdulthood @njames93 For your consideration. https://github.com/llvm/llvm-project/pull/88186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] [clang-tidy] Simplify RenamerClangTidyCheck API (PR #88268)

2024-04-10 Thread Edwin Vane via cfe-commits
revane wrote: @PiotrZSL @carlosgalvezp @LegalizeAdulthood @njames93 For your consideration. https://github.com/llvm/llvm-project/pull/88268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-10 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From 8dda3028dc7f83ced4cdc2475858075d45e04646 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-10 Thread Edwin Vane via cfe-commits
@@ -100,6 +100,8 @@ Improvements to clang-tidy - Improved :program:`run-clang-tidy.py` script. Added argument `-source-filter` to filter source files from the compilation database, via a RegEx. In a similar fashion to what `-header-filter` does for header files. +- Improved

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-10 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From 91d07d734c92ee807bc804c2d08374771cae8c0a Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-10 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From 91d07d734c92ee807bc804c2d08374771cae8c0a Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

[clang-tools-extra] [clang-tidy] Simplify RenamerClangTidyCheck API (PR #88268)

2024-04-11 Thread Edwin Vane via cfe-commits
revane wrote: I don't have write access. Would someone please land the PR for me? https://github.com/llvm/llvm-project/pull/88268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Simplify RenamerClangTidyCheck API (PR #88268)

2024-04-12 Thread Edwin Vane via cfe-commits
revane wrote: @AaronBallman I can't land this PR. https://github.com/llvm/llvm-project/pull/88268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-12 Thread Edwin Vane via cfe-commits
revane wrote: @AaronBallman Other reviewers you would suggest? https://github.com/llvm/llvm-project/pull/88186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-12 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From b01f3305c350afb543afb37cc9f8b98be3ccb06c Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-12 Thread Edwin Vane via cfe-commits
@@ -88,6 +99,7 @@ def __init__(self, args, extra_args): self.has_check_fixes = False self.has_check_messages = False self.has_check_notes = False +self.export = args.export revane wrote: Done https://github.com/llvm/llvm-projec

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-12 Thread Edwin Vane via cfe-commits
@@ -298,7 +318,19 @@ def parse_arguments(): type=csv, help="comma-separated list of FileCheck suffixes", ) -parser.add_argument("-std", type=csv, default=["c++11-or-later"]) +parser.add_argument( +"-export", revane wrote: Do

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-12 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From b9cc1681c73a8af31df38e5f96cf19f14dbc0ccd Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-12 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88186 >From 0c1f7d83c765a6c829543db9719420f7bf7eb02d Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Tue, 9 Apr 2024 16:07:52 -0400 Subject: [PATCH] [clang-tidy] Export fixes from check_clang_tidy.py Makes it possible

[clang-tools-extra] [clang-tidy] Refactor how NamedDecl are renamed (PR #88735)

2024-04-15 Thread Edwin Vane via cfe-commits
https://github.com/revane created https://github.com/llvm/llvm-project/pull/88735 The handling of renaming failures and multiple usages related to those failures is currently spread over several functions. Identifying the failure NamedDecl for a given usage is also duplicated, once when creati

[clang-tools-extra] [clang-tidy] Refactor how NamedDecl are renamed (PR #88735)

2024-04-15 Thread Edwin Vane via cfe-commits
revane wrote: @PiotrZSL Second-last in the sequence of PRs which fix another renaming issue. https://github.com/llvm/llvm-project/pull/88735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang-tools-extra] [clang-tidy] Refactor how NamedDecl are renamed (PR #88735)

2024-04-15 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88735 >From 2249f8c4e28297d72d6f5d36e883b921116f33e4 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Thu, 28 Mar 2024 09:30:32 -0400 Subject: [PATCH] [clang-tidy] Refactor how NamedDecl are renamed The handling of rena

[clang-tools-extra] [clang-tidy] Refactor how NamedDecl are renamed (PR #88735)

2024-04-15 Thread Edwin Vane via cfe-commits
@@ -61,6 +61,44 @@ struct DenseMapInfo { namespace clang::tidy { namespace { +/// Returns the function that \p Method is overridding. If There are none or +/// multiple overrides it returns nullptr. If the overridden function itself is +/// overridding then it will recurse up

[clang-tools-extra] [clang-tidy] Refactor how NamedDecl are renamed (PR #88735)

2024-04-23 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88735 >From 5be7a57838b8fe7042e0719911670f6f369db2e8 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Thu, 28 Mar 2024 09:30:32 -0400 Subject: [PATCH] [clang-tidy] Refactor how NamedDecl are renamed The handling of rena

[clang-tools-extra] [clang-tidy] Refactor how NamedDecl are renamed (PR #88735)

2024-05-07 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/88735 >From 64c1b5b7d6c29c86e0e7f26f0eff3b7a52f95e7e Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Thu, 28 Mar 2024 09:30:32 -0400 Subject: [PATCH] [clang-tidy] Refactor how NamedDecl are renamed The handling of rena

[clang-tools-extra] [clang-tidy] Refactor how NamedDecl are renamed (PR #88735)

2024-05-07 Thread Edwin Vane via cfe-commits
revane wrote: @PiotrZSL I finally got a windows environment set up and fixed the windows build error. Would you merge for me since I don't have permission? https://github.com/llvm/llvm-project/pull/88735 ___ cfe-commits mailing list cfe-commits@lists.

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

2024-05-13 Thread Edwin Vane via cfe-commits
https://github.com/revane created https://github.com/llvm/llvm-project/pull/91954 Member function templates defined out-of-line were resulting in conflicting naming failures with overlapping usage sets. With this change, out-of-line definitions are treated as a usage of the failure which is th

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

2024-05-13 Thread Edwin Vane via cfe-commits
revane wrote: @PiotrZSL Finally fixing renaming of out-of-line template member functions. https://github.com/llvm/llvm-project/pull/91954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

2024-05-14 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/91954 >From ffcc0bfc29b577fd727bc00a912e4c0eb515628a Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Mon, 15 Apr 2024 09:38:48 -0400 Subject: [PATCH] [clang-tidy] Rename out-of-line function definitions Member function

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

2024-05-14 Thread Edwin Vane via cfe-commits
@@ -123,6 +123,9 @@ static const NamedDecl *getFailureForNamedDecl(const NamedDecl *ND) { if (const auto *Method = dyn_cast(ND)) { if (const CXXMethodDecl *Overridden = getOverrideMethod(Method)) Canonical = cast(Overridden->getCanonicalDecl()); +else if (const

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

2024-05-16 Thread Edwin Vane via cfe-commits
revane wrote: @PiotrZSL If everything looks good could you merge this PR for me? https://github.com/llvm/llvm-project/pull/91954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-17 Thread Edwin Vane via cfe-commits
https://github.com/revane updated https://github.com/llvm/llvm-project/pull/91954 >From 5028579d9eb06eb3f1d27f984c0348884334e136 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Mon, 15 Apr 2024 09:38:48 -0400 Subject: [PATCH] [clang-tidy] Rename out-of-line function definitions Member function

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

2024-05-17 Thread Edwin Vane via cfe-commits
revane wrote: It's not too late until it's submitted. I renamed the file as requested. https://github.com/llvm/llvm-project/pull/91954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits