[llvm] [clang-tools-extra] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-01-24 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/78999 >From c22c4fc969af0860b1fb2c371d31c2757da70e01 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Sun, 21 Jan 2024 17:53:31 -0500 Subject: [PATCH 1/2] swap binary ---

[llvm] [clang] [clang-tools-extra] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-02-04 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/78999 >From c22c4fc969af0860b1fb2c371d31c2757da70e01 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Sun, 21 Jan 2024 17:53:31 -0500 Subject: [PATCH 1/2] swap binary ---

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-02-04 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Also pinging @kadircet who recently worked on Include Cleaner's similar batch fixes https://github.com/llvm/llvm-project/pull/79867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-02-13 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Ping https://github.com/llvm/llvm-project/pull/79867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-02-11 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/79867 >From 636e8286b38839c9d90e9eb147ba59d588c3241c Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 29 Jan 2024 11:44:25 -0500 Subject: [PATCH] [clangd] Add fix-all CodeActions ---

[clang-tools-extra] [llvm] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-02-11 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/78999 >From 6abe2b5af090329bfca42d144597fbd5ca41d511 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Sun, 21 Jan 2024 17:53:31 -0500 Subject: [PATCH] [clangd] Swap binary operands ---

[clang-tools-extra] [clangd] Attempt to fix https://github.com/clangd/clangd/issues/1536 (PR #79448)

2024-01-25 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd created https://github.com/llvm/llvm-project/pull/79448 This PR attempts to fix [1536.](https://github.com/clangd/clangd/issues/1536). See in the unit tests, when all quick fixes are of the same `code`, `isPreferred` will be true. However, this doesn't seem to

[clang-tools-extra] [clangd] Attempt to fix https://github.com/clangd/clangd/issues/1536 (PR #79448)

2024-01-28 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd closed https://github.com/llvm/llvm-project/pull/79448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Attempt to fix https://github.com/clangd/clangd/issues/1536 (PR #79448)

2024-01-28 Thread Tor Shepherd via cfe-commits
torshepherd wrote: I'll close this patch and pursue the other things we discussed https://github.com/llvm/llvm-project/pull/79448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-01-29 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd created https://github.com/llvm/llvm-project/pull/79867 This PR adds the following features 1. If there are at least 2 distinct fixable diagnostics stemming from either `clang` or `clang-tidy` overall and their edits are distinct as well, we add a Fix to each

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-01-29 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Another thing that would be nice to solve in a follow-up (applies to unused includes as well btw) is to clean up the list of fixes when someone selects all and presses quick fix:

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-01-29 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Also, I noticed that the conversion function `toCodeAction(const Fix& F, ...)` specifically hardcodes all Fix objects to `QUICKFIX_KIND`. When we do https://github.com/clangd/clangd/issues/1446, it would be good to add a string for `SOURCE_FIX_ALL_KIND` and set these

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-01-30 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd edited https://github.com/llvm/llvm-project/pull/79867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-01-30 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd edited https://github.com/llvm/llvm-project/pull/79867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-01-30 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/79867 >From 0ed7667a5b48064a492f7f125a4002912a35fec7 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 29 Jan 2024 11:44:25 -0500 Subject: [PATCH 1/2] initial cut ---

[llvm] [clang-tools-extra] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-01-26 Thread Tor Shepherd via cfe-commits
@@ -0,0 +1,210 @@ +//===--- SwapBinaryOperands.cpp --*- 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:

[llvm] [clang-tools-extra] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-01-22 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd created https://github.com/llvm/llvm-project/pull/78999 This MR resolves https://github.com/llvm/llvm-project/issues/78998 >From c22c4fc969af0860b1fb2c371d31c2757da70e01 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Sun, 21 Jan 2024 17:53:31 -0500 Subject:

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-01-30 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Hmm I noticed another mini-issue. Ideally we shouldn't have a 'fix all clangd' quick fix if all of the issues come from the same source, only the 'fix all _' option https://github.com/llvm/llvm-project/pull/79867 ___ cfe-commits

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-02-01 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/79867 >From 7cb9e7b604a16414f31309b59747abbd7d3c0025 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 29 Jan 2024 11:44:25 -0500 Subject: [PATCH] [clangd] Add fix-all CodeActions ---

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-05-04 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Bump @HighCommander4 - did you get a chance to review this? I've been using this with great success in my local build for several months now, and the feature is _extremely_ handy. There is a slight bug that overlapping fixes are troublesome if you choose "clangd apply

[clang-tools-extra] [llvm] [clangd] Add CodeAction to swap operands to binary operators (PR #78999)

2024-05-04 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Ping https://github.com/llvm/llvm-project/pull/78999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-05-04 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Ah, awesome. In that case note that I'll make the option not show up when changes would have conflicting overlap ranges https://github.com/llvm/llvm-project/pull/79867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-02-27 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/79867 >From 94dee94becb7d79b087e183754602e08a5c4669d Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 29 Jan 2024 11:44:25 -0500 Subject: [PATCH] [clangd] Add fix-all CodeActions ---