Clang-Format Is Taking Good Shape For LLVM 3.4
Clang-Format is taking shape in LLVM 3.4 to be a competitive answer for automatically transforming and polishing C, C++, and Objective-C code-bases. Clang-Format is part of Clang Tools and can be used for automatic styling of code with easy integration for common programming applications.
One of the big selling points of LLVM/Clang over GCC is the more modular design and clean architecture for adapting LLVM to new use-cases. In the past on Phoronix we have covered how projects like CLDOC can automatically leverage Clang to auto-document C/C++ code-bases, OCLint as a Clang-based static analysis tool, and using Clang for code comments and documentation.
Coming into good shape for LLVM 3.4 is clang-format as a standalone tool built atop LLVM's LibFormat library for code formatting. Clang-Format can automatically parse C, C++, and Objective-C code-bases and to format the code against a given style. New style files can be shipped by a given project that outline how the source-code should be formatted with regards to spacing, indentation, etc. Style files shipped for projects in LLVM's Clang Tools already include for LLVM, Google, Chromium, Mozilla, and WebKit.
Clang-Format can be run from the command-line or there's also support for integration with Vim, Emacs, BBEdit, and Git-based patch re-formatting.
For those interested in learning more about Clang Format, see the LLVM documentation and for Clang Tools.
One of the big selling points of LLVM/Clang over GCC is the more modular design and clean architecture for adapting LLVM to new use-cases. In the past on Phoronix we have covered how projects like CLDOC can automatically leverage Clang to auto-document C/C++ code-bases, OCLint as a Clang-based static analysis tool, and using Clang for code comments and documentation.
Coming into good shape for LLVM 3.4 is clang-format as a standalone tool built atop LLVM's LibFormat library for code formatting. Clang-Format can automatically parse C, C++, and Objective-C code-bases and to format the code against a given style. New style files can be shipped by a given project that outline how the source-code should be formatted with regards to spacing, indentation, etc. Style files shipped for projects in LLVM's Clang Tools already include for LLVM, Google, Chromium, Mozilla, and WebKit.
Clang-Format can be run from the command-line or there's also support for integration with Vim, Emacs, BBEdit, and Git-based patch re-formatting.
For those interested in learning more about Clang Format, see the LLVM documentation and for Clang Tools.
1 Comment