clang-format.py currently only works in vim compiled against python2. This patch adds the necessary syntax changes to make this work with python3. Ubuntu16 and Arch (at least) ship vim compiled against python3 by default, so this affected me during my recent upgrade.
I've tested this with python3 on ASCII scripts, but have not taken the time to verify this with non-ascii characters in the source. Following the advice here the text piped to clang-format is encoded in the same encoding vim is using. If someone more familiar with clang-format proper is able to comment on the correctness of this behaviour, I'd appreciate it.
For python3 usage, should these lines updated to :py3f instead of :pyf?