clang: a C language family frontend for LLVM
The goal of the Clang project is to create a new C, C++, Objective C and Objective C++ front-end for the LLVM compiler. You can get and build the source today.
Features and Goals
Some of the goals for the project include the following:
- Fast compiles and low memory use
- Expressive diagnostics (examples)
- GCC compatibility
- Modular library based architecture
- Support diverse clients (refactoring, static analysis, code generation, etc)
- Allow tight integration with IDEs
- Use the LLVM 'BSD' License
Internal Design and Implementation:
- A real-world, production quality compiler
- A simple and hackable code base
- A single unified parser for C, Objective C, C++, and Objective C++
- Conformance with C/C++/ObjC and their variants
Of course this is only a rough outline of the goals and features of Clang. To get a true sense of what it is all about, see the Features section, which breaks each of these down and explains them in more detail.
Why?
The development of a new front-end was started out of a need -- a need for a compiler that allows better diagnostics, better integration with IDEs, a license that is compatible with commercial products, and a nimble compiler that is easy to develop and maintain. All of these were motivations for starting work on a new front-end that could meet these needs.
A good (but quite dated) introduction to Clang can be found in the following video lectures:
- Clang Introduction (May 2007)
- Features and Performance of Clang (July 2007)
For a more detailed comparison between Clang and other compilers, please see the clang comparison page.
Current Status
Clang is still under heavy development. Clang is considered to be a production quality C, Objective-C, C++ and Objective-C++ compiler when targeting X86-32, X86-64, and ARM (other targets may have caveats, but are usually easy to fix). If you are looking for source analysis or source-to-source transformation tools, clang is probably a great solution for you. Clang supports most of C++11, please see the C++ status page for more information.
Get it and get involved!
Start by getting the code, building it, and playing with it. This will show you the sorts of things we can do today and will let you have the "clang experience" first hand: hopefully it will "resonate" with you. :)
Once you've done that, please consider getting involved in the clang community. The clang developers include numerous volunteer contributors with a variety of backgrounds. If you're interested in following the development of clang, signing up for a mailing list is a good way to learn about how the project works.