Forked from https://github.com/llvm/llvm-project/blob/master/clang/tools/clang-format/clang-format-diff.py