Issue 240059
Summary [clang-format] clang-format-diff.py formats nothing when +++ lines carry a timestamp
Labels clang-format
Assignees
Reporter thejesh23
    `diff -u` and `svn diff` write `+++` lines as `+++ file<TAB>timestamp`. clang-format-diff.py keeps the timestamp as part of the file name, so `-iregex` never matches and nothing is formatted:

```
$ diff -U0 old.cpp new.cpp | clang-format-diff.py
$ # no output, although new.cpp has unformatted lines
```

This also breaks the `svn diff --diff-cmd=diff -x-U0` usage shown in the script's help.

_Found with help from Claude Code. I reproduced and reviewed it myself._

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to