dougk added a comment. To prevent clang-format from adjusting whitespace in the entire file, you want to use clang-format-diff.py - git diff | tools/clang/tools/clang-format/clang-format-diff.py -p1 -style=llvm http://reviews.llvm.org/D9573