[clang-tools-extra] [tool] Add support for `-ignore-insert-conflict` option in `clang-apply-replacements` (PR #127066)

Carlos Galvez via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 14 03:17:44 PST 2025


Vicente Mataix =?utf-8?q?Ferrándiz?= <vmataix at altair.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/127066 at github.com>


================
@@ -198,9 +198,12 @@ def find_binary(arg: str, name: str, build_path: str) -> str:
 def apply_fixes(
     args: argparse.Namespace, clang_apply_replacements_binary: str, tmpdir: str
 ) -> None:
-    """Calls clang-apply-fixes on a given directory."""
+    """Calls clang-apply-replacements on a given directory."""
     invocation = [clang_apply_replacements_binary]
-    invocation.append("-ignore-insert-conflict")
+    
+    if args.ignore_insert_conflict:  # Only append if the user specified it
+        invocation.append("-ignore-insert-conflict")
+
----------------
carlosgalvezp wrote:

Remove newline

https://github.com/llvm/llvm-project/pull/127066


More information about the cfe-commits mailing list