This is an archive of the discontinued LLVM Phabricator instance.

Make clang-format better about finding itself on Debian Jessie
AbandonedPublic

Authored by eklitzke on Apr 1 2016, 5:53 PM.

Details

Summary

This tries to fall back to clang-format-3.5 or clang-format-3.4. This is hacky, but Jessie is the only major distro with this issue so I don't ancipiate this code getting more complicated.

I couldn't figure out how to get arcanist set up so instead you get this kind of ghetto diff.

Diff Detail

Event Timeline

eklitzke retitled this revision from to Make clang-format better about finding itself on Debian Jessie.
eklitzke updated this object.
eklitzke added reviewers: klimek, grosser, djasper.
eklitzke set the repository for this revision to rL LLVM.
djasper edited edge metadata.Apr 1 2016, 10:30 PM

I don't think it is a good idea to make support for clang-format-3.4 and clang-format-3.5 better at this point. clang-format-3.4 is from 2013 and we have developed many very significant improvements since then. If a Linux distribution comes with only those, we should strongly recommend to install an up-to-date version through some other means.

For now, can we do the same here as we do in the vim integration (clang-format.py)? Specifically:

  • Add a configuration option that users can set
  • Extend the comment to explain that "clang-format" has to be on the path if it isn't explicitly set through that option
eklitzke abandoned this revision.Apr 2 2016, 6:41 PM

There already is a configuration option here, so I guess the question is just whether the docs need to be more thorough.

Docs can always be better. Feel free to send a patch to improve them!

It looks like someone beat me to it -- modern verions of clang-format.el will warn when clang-format cannot be found.