[libcxx-commits] [libcxx] [libc++] Add a merge driver that can apply clang-format (PR #73712)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 1 07:24:17 PST 2023


ldionne wrote:

> General remark: in a bash script, I would always quote all the string substitutions containing file names, just to avoid any trouble ever with spaces in file names.

Yeah, I almost always do this and I don't know why this time around I got lazy. I fixed that now, thanks for the heads up.

> Also, I don't know if you care about clang-format failures?
>
> Chromium seems to have ended up with a [Python script](https://chromium.googlesource.com/chromium/tools/depot_tools/+/refs/heads/chrome/4147/clang_format_merge_driver.py) for this?

I wonder if that's a bit overkill for us. I expect this to be mostly a one-shot deal, I wouldn't really expect this script to stay around after the original clang-format run. I also expect that very few people will actually want to install this merge driver -- basically only contributors who have a lot of patches to rebase across the change, and maybe some downstream integrators will install it as a one-shot thing to deal with the large initial reformatting. But if you think it's useful for this to be more robust / cross-platform, I can easily migrate to Python.

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


More information about the libcxx-commits mailing list