Issue 170407
Summary clang-format outputs nothing with --assume-filename
Labels
Assignees matts1
Reporter matts1
    If you run `cat f.cc | clang-format --assume-filename f.cc`, and `.clang-format-ignore` includes f.cc, then nothing is printed.

Tools expect that running `clang-format` without `-i` will result in a formatted file being written to stdout. For example, to format files in version control history without running `git checkout` on each commit, our tools:
1) Read the object from the parent commit containing the file
1) Run `clang-format --assume-filename <path>`
1) Write back the output to the parent commits git objects directly.
1) Perform a rebase
1) Check out the rebased commit

This rewrites the file to an empty file.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to