MarcoFalke added a comment.

>   why is this switch necessary?

It is not necessary, but would be nice if the script run on python3 as well (as 
opposed to only python2, which is going to be deprecated 
https://pythonclock.org/)

>   what's expected to be supported with it?

I'd assume python2.7 (which is the only supported python2) and everything from 
python3.4 and upward.

>   how do I test it?

The clang-format-diff.py is a wrapper around clang-format, to format only a 
diff. You can get any diff, e.g. the last ten commits to the master branch:

  git diff HEAD~10 -U0 | python2 ./tools/clang-format/clang-format-diff.py

(You might have to pass `-p1`)

Then test that the following options work with both python2 and python3:

  -i -v  # flags
  -regex # could be -regex '.*\.h'
  -iregex # could be -iregex '.*\.H'




https://reviews.llvm.org/D48098



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to