Skip to content
Closed
11 changes: 9 additions & 2 deletions clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ 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:
invocation.append("-ignore-insert-conflict")
if args.format:
invocation.append("-format")
if args.style:
Expand Down Expand Up @@ -446,6 +448,11 @@ async def main() -> None:
action="store_true",
help="Allow empty enabled checks.",
)
parser.add_argument(
"-ignore-insert-conflict",
action="store_true",
help="Ignore insert conflict when applying fixes.",
)
args = parser.parse_args()

db_path = "compile_commands.json"
Expand Down