Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

latest clang-format on centos

I would like to use clang-format in my project, however, the version that comes with centos 7 seems to be very old. Where can I download the latest version ? I looked at llvm/clang svn repo (and also git repo - https://github.com/llvm-mirror/clang/tree/master/tools/clang-format) , but I don't understand if it is something that I need to compile myself or if it is just a script that I can download and use.

Can someone please help how to get going on this ? I do have a .clang-format file ready, but the older version is not recognizing many keywords in the file.

Thanks, S.K

like image 862
S.K Avatar asked Oct 16 '25 13:10

S.K


1 Answers

I was able to figure this out by following the instructions at http://clang.llvm.org/get_started.html. I had to include to clang extra tools, which are put under "optional" category in that link. Once I compiled the whole tree, bin/ directory had the clang-format executable.

like image 73
S.K Avatar answered Oct 18 '25 08:10

S.K



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!