blob: 63ecc38c862819eae9bef9dc529c4532e1067a3c [file] [log] [blame]
Sylvestre Ledru29e2a582017-08-25 08:44:56 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
Cedric Venet084381332009-02-14 20:20:19 +00002 "http://www.w3.org/TR/html4/strict.dtd">
3<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
4<html>
5<head>
Gabor Greifdd4ddf12009-02-25 15:22:45 +00006 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
Cedric Venet084381332009-02-14 20:20:19 +00007 <title>"clang" C Language Family Frontend for LLVM</title>
Gabor Greifdd4ddf12009-02-25 15:22:45 +00008 <link type="text/css" rel="stylesheet" href="menu.css">
9 <link type="text/css" rel="stylesheet" href="content.css">
Cedric Venet084381332009-02-14 20:20:19 +000010</head>
11<body>
12<!--#include virtual="menu.html.incl"-->
13<div id="content">
14 <!--*********************************************************************-->
15 <h1>clang: a C language family frontend for LLVM</h1>
16 <!--*********************************************************************-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000017
Anastasia Stulova18e165f2017-01-12 17:52:22 +000018 <p>The goal of the Clang project is to create a new C based language
19 front-end: C, C++, Objective C/C++, OpenCL C and others for the
20 <a href="http://www.llvm.org/">LLVM</a> compiler. You can
21 <a href="get_started.html">get and build</a> the source today.</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000022
Cedric Venet084381332009-02-14 20:20:19 +000023 <!--=====================================================================-->
24 <h2 id="goals">Features and Goals</h2>
25 <!--=====================================================================-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000026
Cedric Venet084381332009-02-14 20:20:19 +000027 <p>Some of the goals for the project include the following:</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000028
Cedric Venet084381332009-02-14 20:20:19 +000029 <p><b><a href="features.html#enduser">End-User Features</a></b>:</p>
30
31 <ul>
32 <li>Fast compiles and low memory use</li>
Chris Lattner8fda6742009-03-19 18:58:22 +000033 <li>Expressive diagnostics (<a href="diagnostics.html">examples</a>)</li>
Cedric Venet084381332009-02-14 20:20:19 +000034 <li>GCC compatibility</li>
35 </ul>
36
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000037 <p><b><a href="features.html#applications">Utility and
Cedric Venet084381332009-02-14 20:20:19 +000038 Applications</a></b>:</p>
39
40 <ul>
41 <li>Modular library based architecture</li>
42 <li>Support diverse clients (refactoring, static analysis, code generation,
Alp Toker344845b2014-01-16 17:04:52 +000043 etc.)</li>
Cedric Venet084381332009-02-14 20:20:19 +000044 <li>Allow tight integration with IDEs</li>
45 <li>Use the LLVM 'BSD' License</li>
46 </ul>
47
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000048 <p><b><a href="features.html#design">Internal Design and
Cedric Venet084381332009-02-14 20:20:19 +000049 Implementation</a></b>:</p>
50
51 <ul>
52 <li>A real-world, production quality compiler</li>
53 <li>A simple and hackable code base</li>
54 <li>A single unified parser for C, Objective C, C++, and Objective C++</li>
55 <li>Conformance with C/C++/ObjC and their variants</li>
56 </ul>
57
58 <p>Of course this is only a rough outline of the goals and features of
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000059 Clang. To get a true sense of what it is all about, see the <a
Cedric Venet084381332009-02-14 20:20:19 +000060 href="features.html">Features</a> section, which breaks
61 each of these down and explains them in more detail.</p>
62
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000063
Cedric Venet084381332009-02-14 20:20:19 +000064 <!--=====================================================================-->
65 <h2>Why?</h2>
66 <!--=====================================================================-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000067
Alp Toker344845b2014-01-16 17:04:52 +000068 <p>Development of the new front-end was started out of a need
Cedric Venet084381332009-02-14 20:20:19 +000069 for a compiler that allows better diagnostics, better integration with
70 IDEs, a license that is compatible with commercial products, and a
71 nimble compiler that is easy to develop and maintain. All of these were
72 motivations for starting work on a new front-end that could
73 meet these needs.</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000074
Cedric Venet084381332009-02-14 20:20:19 +000075 <p>A good (but quite dated) introduction to Clang can be found in the
76 following video lectures:</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000077
Cedric Venet084381332009-02-14 20:20:19 +000078 <ul>
79 <li><a href="clang_video-05-25-2007.html">Clang Introduction</a>
80 (May 2007)</li>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000081 <li><a href="clang_video-07-25-2007.html">Features and Performance of
Cedric Venet084381332009-02-14 20:20:19 +000082 Clang</a> (July 2007)</li>
83 </ul>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000084
Cedric Venet084381332009-02-14 20:20:19 +000085 <p>For a more detailed comparison between Clang and other compilers, please
86 see the <a href="comparison.html">clang comparison page</a>.</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000087
Cedric Venet084381332009-02-14 20:20:19 +000088 <!--=====================================================================-->
89 <h2>Current Status</h2>
90 <!--=====================================================================-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000091
Alp Toker344845b2014-01-16 17:04:52 +000092 <p>Clang is considered to
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000093 be a production quality C, Objective-C, C++ and Objective-C++ compiler when
94 targeting X86-32, X86-64, and ARM (other targets may have caveats, but are
Chris Lattner586c51e2010-10-07 04:28:56 +000095 usually easy to fix). If you are looking for source analysis or
Mandeep Singh Granga2623c82016-02-10 21:06:10 +000096 source-to-source transformation tools, Clang is probably a great
Sylvestre Ledru29e2a582017-08-25 08:44:56 +000097 solution for you. Clang supports C++11, C++14 and C++17, please see the <a
Douglas Gregorbb26a922010-02-05 23:51:14 +000098 href="cxx_status.html">C++ status</a> page for more
99 information.</p>
Cedric Venet084381332009-02-14 20:20:19 +0000100
Cedric Venet084381332009-02-14 20:20:19 +0000101 <!--=====================================================================-->
102 <h2>Get it and get involved!</h2>
103 <!--=====================================================================-->
Sylvestre Ledru29e2a582017-08-25 08:44:56 +0000104
Cedric Venet084381332009-02-14 20:20:19 +0000105 <p>Start by <a href="get_started.html">getting the code, building it, and
106 playing with it</a>. This will show you the sorts of things we can do
Mandeep Singh Granga2623c82016-02-10 21:06:10 +0000107 today and will let you have the "Clang experience" first hand: hopefully
Cedric Venet084381332009-02-14 20:20:19 +0000108 it will "resonate" with you. :)</p>
Sylvestre Ledru29e2a582017-08-25 08:44:56 +0000109
Cedric Venet084381332009-02-14 20:20:19 +0000110 <p>Once you've done that, please consider <a href="get_involved.html">getting
Mandeep Singh Granga2623c82016-02-10 21:06:10 +0000111 involved in the clang community</a>. The Clang developers include numerous
Sylvestre Ledru29e2a582017-08-25 08:44:56 +0000112 volunteer contributors with a variety of backgrounds. If you're
Cedric Venet084381332009-02-14 20:20:19 +0000113 interested in
Mandeep Singh Granga2623c82016-02-10 21:06:10 +0000114 following the development of Clang, signing up for a mailing list is a good
Cedric Venet084381332009-02-14 20:20:19 +0000115 way to learn about how the project works.</p>
116</div>
117</body>
118</html>