Add svn:eol-style=native to some files

Correct two files with inconsistent lines endings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64564 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Cedric Venet 2009-02-14 20:20:19 +00:00
Родитель f3710babc1
Коммит 3d658640ab
19 изменённых файлов: 2729 добавлений и 2729 удалений

Просмотреть файл

@ -1,106 +1,106 @@
//===--- SemaCXXScopeSpec.cpp - Semantic Analysis for C++ scope specifiers-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements C++ semantic analysis for scope specifiers.
//
//===----------------------------------------------------------------------===//
#include "Sema.h"
#include "clang/AST/ASTContext.h"
#include "clang/Parse/DeclSpec.h"
#include "llvm/ADT/STLExtras.h"
using namespace clang;
/// ActOnCXXGlobalScopeSpecifier - Return the object that represents the
/// global scope ('::').
Sema::CXXScopeTy *Sema::ActOnCXXGlobalScopeSpecifier(Scope *S,
SourceLocation CCLoc) {
return cast<DeclContext>(Context.getTranslationUnitDecl());
}
/// ActOnCXXNestedNameSpecifier - Called during parsing of a
/// nested-name-specifier. e.g. for "foo::bar::" we parsed "foo::" and now
/// we want to resolve "bar::". 'SS' is empty or the previously parsed
/// nested-name part ("foo::"), 'IdLoc' is the source location of 'bar',
/// 'CCLoc' is the location of '::' and 'II' is the identifier for 'bar'.
/// Returns a CXXScopeTy* object representing the C++ scope.
Sema::CXXScopeTy *Sema::ActOnCXXNestedNameSpecifier(Scope *S,
const CXXScopeSpec &SS,
SourceLocation IdLoc,
SourceLocation CCLoc,
IdentifierInfo &II) {
NamedDecl *SD = LookupParsedName(S, &SS, &II, LookupNestedNameSpecifierName);
if (SD) {
if (TypedefDecl *TD = dyn_cast<TypedefDecl>(SD)) {
if (const RecordType* Record = TD->getUnderlyingType()->getAsRecordType())
return cast<DeclContext>(Record->getDecl());
} else if (isa<NamespaceDecl>(SD) || isa<RecordDecl>(SD)) {
return cast<DeclContext>(SD);
}
// FIXME: Template parameters and dependent types.
// FIXME: C++0x scoped enums
// Fall through to produce an error: we found something that isn't
// a class or a namespace.
}
// If we didn't find anything during our lookup, try again with
// ordinary name lookup, which can help us produce better error
// messages.
if (!SD)
SD = LookupParsedName(S, &SS, &II, LookupOrdinaryName);
unsigned DiagID;
if (SD)
DiagID = diag::err_expected_class_or_namespace;
else if (SS.isSet())
DiagID = diag::err_typecheck_no_member;
else
DiagID = diag::err_undeclared_var_use;
if (SS.isSet())
Diag(IdLoc, DiagID) << &II << SS.getRange();
else
Diag(IdLoc, DiagID) << &II;
return 0;
}
/// ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global
/// scope or nested-name-specifier) is parsed, part of a declarator-id.
/// After this method is called, according to [C++ 3.4.3p3], names should be
/// looked up in the declarator-id's scope, until the declarator is parsed and
/// ActOnCXXExitDeclaratorScope is called.
/// The 'SS' should be a non-empty valid CXXScopeSpec.
void Sema::ActOnCXXEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
assert(PreDeclaratorDC == 0 && "Previous declarator context not popped?");
PreDeclaratorDC = static_cast<DeclContext*>(S->getEntity());
CurContext = static_cast<DeclContext*>(SS.getScopeRep());
S->setEntity(CurContext);
}
/// ActOnCXXExitDeclaratorScope - Called when a declarator that previously
/// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
/// CXXScopeSpec that was passed to ActOnCXXEnterDeclaratorScope as well.
/// Used to indicate that names should revert to being looked up in the
/// defining scope.
void Sema::ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
assert(S->getEntity() == SS.getScopeRep() && "Context imbalance!");
S->setEntity(PreDeclaratorDC);
PreDeclaratorDC = 0;
// Reset CurContext to the nearest enclosing context.
while (!S->getEntity() && S->getParent())
S = S->getParent();
CurContext = static_cast<DeclContext*>(S->getEntity());
}
//===--- SemaCXXScopeSpec.cpp - Semantic Analysis for C++ scope specifiers-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements C++ semantic analysis for scope specifiers.
//
//===----------------------------------------------------------------------===//
#include "Sema.h"
#include "clang/AST/ASTContext.h"
#include "clang/Parse/DeclSpec.h"
#include "llvm/ADT/STLExtras.h"
using namespace clang;
/// ActOnCXXGlobalScopeSpecifier - Return the object that represents the
/// global scope ('::').
Sema::CXXScopeTy *Sema::ActOnCXXGlobalScopeSpecifier(Scope *S,
SourceLocation CCLoc) {
return cast<DeclContext>(Context.getTranslationUnitDecl());
}
/// ActOnCXXNestedNameSpecifier - Called during parsing of a
/// nested-name-specifier. e.g. for "foo::bar::" we parsed "foo::" and now
/// we want to resolve "bar::". 'SS' is empty or the previously parsed
/// nested-name part ("foo::"), 'IdLoc' is the source location of 'bar',
/// 'CCLoc' is the location of '::' and 'II' is the identifier for 'bar'.
/// Returns a CXXScopeTy* object representing the C++ scope.
Sema::CXXScopeTy *Sema::ActOnCXXNestedNameSpecifier(Scope *S,
const CXXScopeSpec &SS,
SourceLocation IdLoc,
SourceLocation CCLoc,
IdentifierInfo &II) {
NamedDecl *SD = LookupParsedName(S, &SS, &II, LookupNestedNameSpecifierName);
if (SD) {
if (TypedefDecl *TD = dyn_cast<TypedefDecl>(SD)) {
if (const RecordType* Record = TD->getUnderlyingType()->getAsRecordType())
return cast<DeclContext>(Record->getDecl());
} else if (isa<NamespaceDecl>(SD) || isa<RecordDecl>(SD)) {
return cast<DeclContext>(SD);
}
// FIXME: Template parameters and dependent types.
// FIXME: C++0x scoped enums
// Fall through to produce an error: we found something that isn't
// a class or a namespace.
}
// If we didn't find anything during our lookup, try again with
// ordinary name lookup, which can help us produce better error
// messages.
if (!SD)
SD = LookupParsedName(S, &SS, &II, LookupOrdinaryName);
unsigned DiagID;
if (SD)
DiagID = diag::err_expected_class_or_namespace;
else if (SS.isSet())
DiagID = diag::err_typecheck_no_member;
else
DiagID = diag::err_undeclared_var_use;
if (SS.isSet())
Diag(IdLoc, DiagID) << &II << SS.getRange();
else
Diag(IdLoc, DiagID) << &II;
return 0;
}
/// ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global
/// scope or nested-name-specifier) is parsed, part of a declarator-id.
/// After this method is called, according to [C++ 3.4.3p3], names should be
/// looked up in the declarator-id's scope, until the declarator is parsed and
/// ActOnCXXExitDeclaratorScope is called.
/// The 'SS' should be a non-empty valid CXXScopeSpec.
void Sema::ActOnCXXEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
assert(PreDeclaratorDC == 0 && "Previous declarator context not popped?");
PreDeclaratorDC = static_cast<DeclContext*>(S->getEntity());
CurContext = static_cast<DeclContext*>(SS.getScopeRep());
S->setEntity(CurContext);
}
/// ActOnCXXExitDeclaratorScope - Called when a declarator that previously
/// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
/// CXXScopeSpec that was passed to ActOnCXXEnterDeclaratorScope as well.
/// Used to indicate that names should revert to being looked up in the
/// defining scope.
void Sema::ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
assert(S->getEntity() == SS.getScopeRep() && "Context imbalance!");
S->setEntity(PreDeclaratorDC);
PreDeclaratorDC = 0;
// Reset CurContext to the nearest enclosing context.
while (!S->getEntity() && S->getParent())
S = S->getParent();
CurContext = static_cast<DeclContext*>(S->getEntity());
}

Просмотреть файл

@ -1,11 +1,11 @@
// RUN: clang -parse-noop -verify %s
void f() {
int a;
while (a) ;
while (int x) ; // expected-error {{expected '=' after declarator}}
while (float x = 0) ;
if (const int x = a) ;
switch (int x = a+10) {}
for (; int x = ++a; ) ;
}
// RUN: clang -parse-noop -verify %s
void f() {
int a;
while (a) ;
while (int x) ; // expected-error {{expected '=' after declarator}}
while (float x = 0) ;
if (const int x = a) ;
switch (int x = a+10) {}
for (; int x = ++a; ) ;
}

Просмотреть файл

@ -1,5 +1,5 @@
// RUN: clang -fsyntax-only %s
void f(...) {
int g(int(...));
}
// RUN: clang -fsyntax-only %s
void f(...) {
int g(int(...));
}

Просмотреть файл

@ -1,52 +1,52 @@
// RUN: clang -fsyntax-only -verify %s
class C { };
C c;
void D(int);
class D {}; // expected-note {{previous use is here}}
void foo()
{
D(5);
class D d;
}
class D;
enum D; // expected-error {{use of 'D' with tag type that does not match previous declaration}}
class A * A;
class A * a2;
void bar()
{
A = 0;
}
void C(int);
void bar2()
{
C(17);
}
extern int B;
class B;
class B {};
int B;
enum E { e1_val };
E e1;
void E(int);
void bar3() {
E(17);
}
enum E e2;
enum E2 { E2 };
// RUN: clang -fsyntax-only -verify %s
class C { };
C c;
void D(int);
class D {}; // expected-note {{previous use is here}}
void foo()
{
D(5);
class D d;
}
class D;
enum D; // expected-error {{use of 'D' with tag type that does not match previous declaration}}
class A * A;
class A * a2;
void bar()
{
A = 0;
}
void C(int);
void bar2()
{
C(17);
}
extern int B;
class B;
class B {};
int B;
enum E { e1_val };
E e1;
void E(int);
void bar3() {
E(17);
}
enum E e2;
enum E2 { E2 };

Просмотреть файл

@ -1,8 +1,8 @@
// RUN: clang -fsyntax-only -verify %s
void test() {
int x;
do
int x;
while (1);
int x;
do
int x;
while (1);
}

Просмотреть файл

@ -1,23 +1,23 @@
// RUN: clang -fsyntax-only -verify %s
void f() const; // expected-error {{type qualifier is not allowed on this function}}
typedef void cfn() const;
cfn f2; // expected-error {{a qualified function type cannot be used to declare a nonmember function or a static member function}}
class C {
void f() const;
cfn f2;
static void f3() const; // expected-error {{type qualifier is not allowed on this function}}
static cfn f4; // expected-error {{a qualified function type cannot be used to declare a nonmember function or a static member function}}
void m1() {
x = 0;
}
void m2() const {
x = 0; // expected-error {{read-only variable is not assignable}}
}
int x;
};
// RUN: clang -fsyntax-only -verify %s
void f() const; // expected-error {{type qualifier is not allowed on this function}}
typedef void cfn() const;
cfn f2; // expected-error {{a qualified function type cannot be used to declare a nonmember function or a static member function}}
class C {
void f() const;
cfn f2;
static void f3() const; // expected-error {{type qualifier is not allowed on this function}}
static cfn f4; // expected-error {{a qualified function type cannot be used to declare a nonmember function or a static member function}}
void m1() {
x = 0;
}
void m2() const {
x = 0; // expected-error {{read-only variable is not assignable}}
}
int x;
};

Просмотреть файл

@ -1,32 +1,32 @@
// RUN: clang -fsyntax-only -verify %s
class A { };
class B1 : A { };
class B2 : virtual A { };
class B3 : virtual virtual A { }; // expected-error{{duplicate 'virtual' in base specifier}}
class C : public B1, private B2 { };
class D;
class E : public D { }; // expected-error{{base class has incomplete type}}
typedef int I;
class F : public I { }; // expected-error{{base specifier must name a class}}
union U1 : public A { }; // expected-error{{unions cannot have base classes}}
union U2 {};
class G : public U2 { }; // expected-error{{unions cannot be base classes}}
typedef G G_copy;
typedef G G_copy_2;
typedef G_copy G_copy_3;
class H : G_copy, A, G_copy_2, // expected-error{{base class 'G_copy' specified more than once as a direct base class}}
public G_copy_3 { }; // expected-error{{base class 'G_copy' specified more than once as a direct base class}}
// RUN: clang -fsyntax-only -verify %s
class A { };
class B1 : A { };
class B2 : virtual A { };
class B3 : virtual virtual A { }; // expected-error{{duplicate 'virtual' in base specifier}}
class C : public B1, private B2 { };
class D;
class E : public D { }; // expected-error{{base class has incomplete type}}
typedef int I;
class F : public I { }; // expected-error{{base specifier must name a class}}
union U1 : public A { }; // expected-error{{unions cannot have base classes}}
union U2 {};
class G : public U2 { }; // expected-error{{unions cannot be base classes}}
typedef G G_copy;
typedef G G_copy_2;
typedef G_copy G_copy_3;
class H : G_copy, A, G_copy_2, // expected-error{{base class 'G_copy' specified more than once as a direct base class}}
public G_copy_3 { }; // expected-error{{base class 'G_copy' specified more than once as a direct base class}}

Просмотреть файл

@ -1,27 +1,27 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>2007 LLVM Developer's Meeting</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<h1>2007 LLVM Developer's Meeting</h1>
Discussion about Clang at the <a href="http://llvm.org/devmtg/2007-05/">2007 LLVM Developer's Meeting</a>.
<h2>About:</h2>
<p>In this video, Steve Naroff introduces the Clang project and talks about some of the goals and motivations for starting the project.
<br><br>
<p><b>Details:</b> New LLVM C Front-end - This talk describes a new from-scratch C frontend (which is aiming to support Objective C and C++ someday) for LLVM, built as a native part of the LLVM system and in the LLVM design style.
<h2>The Presentation:</h2>
<p>You can download a copy of the presentation in mov format. However, due to the picture quality, it is recommended that you also download the lecture slides for viewing while you watch the video.
<ul>
<li><a href="http://llvm.org/devmtg/2007-05/09-Naroff-CFE.mov">Video (mov file)</a>
<li><a href="http://llvm.org/devmtg/2007-05/09-Naroff-CFE.pdf">Lecture slides (PDF)</a>
</ul>
</div>
</body>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>2007 LLVM Developer's Meeting</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<h1>2007 LLVM Developer's Meeting</h1>
Discussion about Clang at the <a href="http://llvm.org/devmtg/2007-05/">2007 LLVM Developer's Meeting</a>.
<h2>About:</h2>
<p>In this video, Steve Naroff introduces the Clang project and talks about some of the goals and motivations for starting the project.
<br><br>
<p><b>Details:</b> New LLVM C Front-end - This talk describes a new from-scratch C frontend (which is aiming to support Objective C and C++ someday) for LLVM, built as a native part of the LLVM system and in the LLVM design style.
<h2>The Presentation:</h2>
<p>You can download a copy of the presentation in mov format. However, due to the picture quality, it is recommended that you also download the lecture slides for viewing while you watch the video.
<ul>
<li><a href="http://llvm.org/devmtg/2007-05/09-Naroff-CFE.mov">Video (mov file)</a>
<li><a href="http://llvm.org/devmtg/2007-05/09-Naroff-CFE.pdf">Lecture slides (PDF)</a>
</ul>
</div>
</body>
</html>

Просмотреть файл

@ -1,30 +1,30 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>LLVM 2.0 and Beyond!</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<h1>LLVM 2.0 and Beyond!</h1>
A Google Techtalk by <a href="http://www.nondot.org/sabre/">Chris Lattner</a>
<h2>About:</h2>
<p>In this video, Chris Lattner talks about some of the features of Clang, especially in regards to performance.
<br><br>
<p><b>Details:</b> The LLVM 2.0 release brings a number of new features and capabilities to the LLVM toolset. This talk briefly describes those features, then moves on to talk about what is next: llvm 2.1, llvm-gcc 4.2, and puts a special emphasis on the 'clang' C front-end. This describes how the 'clang' preprocessor can be used to improve the scalability of distcc by up to 4.4x.
<h2>The Presentation:</h2>
<p>You can view the presentation through google video. In addition, the slides from the presentation are also available, if you wish to retain a copy.
<ul>
<li><a href="http://video.google.com/videoplay?docid=1921156852099786640">Google Tech Talk Video (19:00-)</a> (Note: the Clang lecture starts at 19 minutes into the video.)
<li><a href="http://llvm.org/pubs/2007-07-25-LLVM-2.0-and-Beyond.pdf">LLVM 2.0 and Beyond! slides (PDF)</a>
</ul>
<h2>Publishing Information:</h2>
"LLVM 2.0 and Beyond!", Chris Lattner,<br>
<i>Google Tech Talk</i>, Mountain View, CA, July 2007.
</div>
</body>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>LLVM 2.0 and Beyond!</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<h1>LLVM 2.0 and Beyond!</h1>
A Google Techtalk by <a href="http://www.nondot.org/sabre/">Chris Lattner</a>
<h2>About:</h2>
<p>In this video, Chris Lattner talks about some of the features of Clang, especially in regards to performance.
<br><br>
<p><b>Details:</b> The LLVM 2.0 release brings a number of new features and capabilities to the LLVM toolset. This talk briefly describes those features, then moves on to talk about what is next: llvm 2.1, llvm-gcc 4.2, and puts a special emphasis on the 'clang' C front-end. This describes how the 'clang' preprocessor can be used to improve the scalability of distcc by up to 4.4x.
<h2>The Presentation:</h2>
<p>You can view the presentation through google video. In addition, the slides from the presentation are also available, if you wish to retain a copy.
<ul>
<li><a href="http://video.google.com/videoplay?docid=1921156852099786640">Google Tech Talk Video (19:00-)</a> (Note: the Clang lecture starts at 19 minutes into the video.)
<li><a href="http://llvm.org/pubs/2007-07-25-LLVM-2.0-and-Beyond.pdf">LLVM 2.0 and Beyond! slides (PDF)</a>
</ul>
<h2>Publishing Information:</h2>
"LLVM 2.0 and Beyond!", Chris Lattner,<br>
<i>Google Tech Talk</i>, Mountain View, CA, July 2007.
</div>
</body>
</html>

Просмотреть файл

@ -1,195 +1,195 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Comparing clang to other open source compilers</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<h1>Clang vs Other Open Source Compilers</h1>
<p>Building an entirely new compiler front-end is a big task, and it isn't
always clear to people why we decided to do this. Here we compare clang
and its goals to other open source compiler front-ends that are
available. We restrict the discussion to very specific objective points
to avoid controversy where possible. Also, software is infinitely
mutable, so we don't talk about little details that can be fixed with
a reasonable amount of effort: we'll talk about issues that are
difficult to fix for architectural or political reasons.</p>
<p>The goal of this list is to describe how differences in goals lead to
different strengths and weaknesses, not to make some compiler look bad.
This will hopefully help you to evaluate whether using clang is a good
idea for your personal goals. Because we don't know specifically what
<em>you</em> want to do, we describe the features of these compilers in
terms of <em>our</em> goals: if you are only interested in static
analysis, you may not care that something lacks codegen support, for
example.</p>
<p>Please email cfe-dev if you think we should add another compiler to this
list or if you think some characterization is unfair here.</p>
<ul>
<li><a href="#gcc">Clang vs GCC</a> (GNU Compiler Collection)</li>
<li><a href="#elsa">Clang vs Elsa</a> (Elkhound-based C++ Parser)</li>
<li><a href="#pcc">Clang vs PCC</a> (Portable C Compiler)</li>
</ul>
<!--=====================================================================-->
<h2><a name="gcc">Clang vs GCC (GNU Compiler Collection)</a></h2>
<!--=====================================================================-->
<p>Pro's of GCC vs clang:</p>
<ul>
<li>GCC supports languages that clang does not aim to, such as Java, Ada,
FORTRAN, etc.</li>
<li>GCC front-ends are very mature and already support C/C++/ObjC and all
the variants we are interested in. <a href="cxx_status.html">clang's
support for C++</a> in particular is nowhere near what GCC supports.</li>
<li>GCC supports more targets than LLVM.</li>
<li>GCC is popular and widely adopted.</li>
<li>GCC does not require a C++ compiler to build it.</li>
</ul>
<p>Pro's of clang vs GCC:</p>
<ul>
<li>The Clang ASTs and design are intended to be <a
href="features.html#simplecode">easily understandable</a> by
anyone who is familiar with the languages involved and who has a basic
understanding of how a compiler works. GCC has a very old codebase
which presents a steep learning curve to new developers.</li>
<li>Clang is designed as an API from its inception, allowing it to be reused
by source analysis tools, refactoring, IDEs (etc) as well as for code
generation. GCC is built as a monolithic static compiler, which makes
it extremely difficult to use as an API and integrate into other tools.
Further, its historic design and <a
href="http://gcc.gnu.org/ml/gcc/2007-11/msg00460.html">current</a>
<a href="http://gcc.gnu.org/ml/gcc/2004-12/msg00888.html">policy</a>
makes it difficult to decouple the front-end from the rest of the
compiler. </li>
<li>Various GCC design decisions make it very difficult to reuse: its build
system is difficult to modify, you can't link multiple targets into one
binary, you can't link multiple front-ends into one binary, it uses a
custom garbage collector, uses global variables extensively, is not
reentrant or multi-threadable, etc. Clang has none of these problems.
</li>
<li>For every token, clang tracks information about where it was written and
where it was ultimately expanded into if it was involved in a macro.
GCC does not track information about macro instantiations when parsing
source code. This makes it very difficult for source rewriting tools
(e.g. for refactoring) to work in the presence of (even simple)
macros.</li>
<li>Clang does not implicitly simplify code as it parses it like GCC does.
Doing so causes many problems for source analysis tools: as one simple
example, if you write "x-x" in your source code, the GCC AST will
contain "0", with no mention of 'x'. This is extremely bad for a
refactoring tool that wants to rename 'x'.</li>
<li>Clang can serialize its AST out to disk and read it back into another
program, which is useful for whole program analysis. GCC does not have
this. GCC's PCH mechanism (which is just a dump of the compiler
memory image) is related, but is architecturally only
able to read the dump back into the exact same executable as the one
that produced it (it is not a structured format).</li>
<li>Clang is <a href="features.html#performance">much faster and uses far
less memory</a> than GCC.</li>
<li>Clang aims to provide extremely clear and concise diagnostics (error and
warning messages), and includes support for <a
href="features.html#expressivediags">expressive diagnostics</a>. GCC's
warnings are acceptable, but are often confusing and it does not support
expressive diagnostics. Clang also preserves typedefs in diagnostics
consistently.</li>
<li>GCC is licensed under the GPL license. clang uses a BSD license, which
allows it to be used by projects that do not themselves want to be
GPL.</li>
<li>Clang inherits a number of features from its use of LLVM as a backend,
including support for a bytecode representation for intermediate code,
pluggable optimizers, link-time optimization support, Just-In-Time
compilation, ability to link in multiple code generators, etc.</li>
</ul>
<!--=====================================================================-->
<h2><a name="elsa">Clang vs Elsa (Elkhound-based C++ Parser)</a></h2>
<!--=====================================================================-->
<p>Pro's of Elsa vs clang:</p>
<ul>
<li>Elsa's support for C++ is far beyond what clang provides. If you need
C++ support in the next year, Elsa is a great way to get it. That said,
Elsa is missing important support for templates and other pieces: for
example, it is not capable of compiling the GCC STL headers from any
version newer than GCC 3.4.</li>
<li>Elsa's parser and AST is designed to be easily extensible by adding
grammar rules. Clang has a very simple and easily hackable parser,
but requires you to write C++ code to do it.</li>
</ul>
<p>Pro's of clang vs Elsa:</p>
<ul>
<li>The Elsa community is extremely small and major development work seems
to have ceased in 2005, though it continues to be used by other small
projects
(e.g. Oink). Clang has a vibrant community including developers that
are paid to work on it full time. In practice this means that you can
file bugs against Clang and they will often be fixed for you. If you
use Elsa, you are (mostly) on your own for bug fixes and feature
enhancements.</li>
<li>Elsa is not built as a stack of reusable libraries like clang is. It is
very difficult to use part of Elsa without the whole front-end. For
example, you cannot use Elsa to parse C/ObjC code without building an
AST. You can do this in Clang and it is much faster than building an
AST.</li>
<li>Elsa does not have an integrated preprocessor, which makes it extremely
difficult to accurately map from a source location in the AST back to
its original position before preprocessing. Like GCC, it does not keep
track of macro expansions.</li>
<li>Elsa is even slower and uses more memory than GCC, which itself requires
far more space and time than clang.</li>
<li>Elsa only does partial semantic analysis. It is intended to work on
code that is already validated by GCC, so it does not do many semantic
checks required by the languages it implements.</li>
<li>Elsa does not support Objective-C.</li>
<li>Elsa does not support native code generation.</li>
</ul>
<p>Note that there is a fork of Elsa known as "Pork". It addresses some of
these shortcomings by loosely integrating a preprocessor. This allows it
to map from a source location in the AST to the original position before
preprocessing, providing it better support for static analysis and
refactoring. Note that Pork is in stasis now too.</p>
<!--=====================================================================-->
<h2><a name="pcc">Clang vs PCC (Portable C Compiler)</a></h2>
<!--=====================================================================-->
<p>Pro's of PCC vs clang:</p>
<ul>
<li>The PCC source base is very small and builds quickly with just a C
compiler.</li>
</ul>
<p>Pro's of clang vs PCC:</p>
<ul>
<li>PCC dates from the 1970's and has been dormant for most of that time.
The clang + llvm communities are very active.</li>
<li>PCC doesn't support C99, Objective-C, and doesn't aim to support
C++.</li>
<li>PCC's code generation is very limited compared to LLVM. It produces very
inefficient code and does not support many important targets.</li>
<li>Like Elsa, PCC's does not have an integrated preprocessor, making it
extremely difficult to use it for source analysis tools.</li>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Comparing clang to other open source compilers</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<h1>Clang vs Other Open Source Compilers</h1>
<p>Building an entirely new compiler front-end is a big task, and it isn't
always clear to people why we decided to do this. Here we compare clang
and its goals to other open source compiler front-ends that are
available. We restrict the discussion to very specific objective points
to avoid controversy where possible. Also, software is infinitely
mutable, so we don't talk about little details that can be fixed with
a reasonable amount of effort: we'll talk about issues that are
difficult to fix for architectural or political reasons.</p>
<p>The goal of this list is to describe how differences in goals lead to
different strengths and weaknesses, not to make some compiler look bad.
This will hopefully help you to evaluate whether using clang is a good
idea for your personal goals. Because we don't know specifically what
<em>you</em> want to do, we describe the features of these compilers in
terms of <em>our</em> goals: if you are only interested in static
analysis, you may not care that something lacks codegen support, for
example.</p>
<p>Please email cfe-dev if you think we should add another compiler to this
list or if you think some characterization is unfair here.</p>
<ul>
<li><a href="#gcc">Clang vs GCC</a> (GNU Compiler Collection)</li>
<li><a href="#elsa">Clang vs Elsa</a> (Elkhound-based C++ Parser)</li>
<li><a href="#pcc">Clang vs PCC</a> (Portable C Compiler)</li>
</ul>
<!--=====================================================================-->
<h2><a name="gcc">Clang vs GCC (GNU Compiler Collection)</a></h2>
<!--=====================================================================-->
<p>Pro's of GCC vs clang:</p>
<ul>
<li>GCC supports languages that clang does not aim to, such as Java, Ada,
FORTRAN, etc.</li>
<li>GCC front-ends are very mature and already support C/C++/ObjC and all
the variants we are interested in. <a href="cxx_status.html">clang's
support for C++</a> in particular is nowhere near what GCC supports.</li>
<li>GCC supports more targets than LLVM.</li>
<li>GCC is popular and widely adopted.</li>
<li>GCC does not require a C++ compiler to build it.</li>
</ul>
<p>Pro's of clang vs GCC:</p>
<ul>
<li>The Clang ASTs and design are intended to be <a
href="features.html#simplecode">easily understandable</a> by
anyone who is familiar with the languages involved and who has a basic
understanding of how a compiler works. GCC has a very old codebase
which presents a steep learning curve to new developers.</li>
<li>Clang is designed as an API from its inception, allowing it to be reused
by source analysis tools, refactoring, IDEs (etc) as well as for code
generation. GCC is built as a monolithic static compiler, which makes
it extremely difficult to use as an API and integrate into other tools.
Further, its historic design and <a
href="http://gcc.gnu.org/ml/gcc/2007-11/msg00460.html">current</a>
<a href="http://gcc.gnu.org/ml/gcc/2004-12/msg00888.html">policy</a>
makes it difficult to decouple the front-end from the rest of the
compiler. </li>
<li>Various GCC design decisions make it very difficult to reuse: its build
system is difficult to modify, you can't link multiple targets into one
binary, you can't link multiple front-ends into one binary, it uses a
custom garbage collector, uses global variables extensively, is not
reentrant or multi-threadable, etc. Clang has none of these problems.
</li>
<li>For every token, clang tracks information about where it was written and
where it was ultimately expanded into if it was involved in a macro.
GCC does not track information about macro instantiations when parsing
source code. This makes it very difficult for source rewriting tools
(e.g. for refactoring) to work in the presence of (even simple)
macros.</li>
<li>Clang does not implicitly simplify code as it parses it like GCC does.
Doing so causes many problems for source analysis tools: as one simple
example, if you write "x-x" in your source code, the GCC AST will
contain "0", with no mention of 'x'. This is extremely bad for a
refactoring tool that wants to rename 'x'.</li>
<li>Clang can serialize its AST out to disk and read it back into another
program, which is useful for whole program analysis. GCC does not have
this. GCC's PCH mechanism (which is just a dump of the compiler
memory image) is related, but is architecturally only
able to read the dump back into the exact same executable as the one
that produced it (it is not a structured format).</li>
<li>Clang is <a href="features.html#performance">much faster and uses far
less memory</a> than GCC.</li>
<li>Clang aims to provide extremely clear and concise diagnostics (error and
warning messages), and includes support for <a
href="features.html#expressivediags">expressive diagnostics</a>. GCC's
warnings are acceptable, but are often confusing and it does not support
expressive diagnostics. Clang also preserves typedefs in diagnostics
consistently.</li>
<li>GCC is licensed under the GPL license. clang uses a BSD license, which
allows it to be used by projects that do not themselves want to be
GPL.</li>
<li>Clang inherits a number of features from its use of LLVM as a backend,
including support for a bytecode representation for intermediate code,
pluggable optimizers, link-time optimization support, Just-In-Time
compilation, ability to link in multiple code generators, etc.</li>
</ul>
<!--=====================================================================-->
<h2><a name="elsa">Clang vs Elsa (Elkhound-based C++ Parser)</a></h2>
<!--=====================================================================-->
<p>Pro's of Elsa vs clang:</p>
<ul>
<li>Elsa's support for C++ is far beyond what clang provides. If you need
C++ support in the next year, Elsa is a great way to get it. That said,
Elsa is missing important support for templates and other pieces: for
example, it is not capable of compiling the GCC STL headers from any
version newer than GCC 3.4.</li>
<li>Elsa's parser and AST is designed to be easily extensible by adding
grammar rules. Clang has a very simple and easily hackable parser,
but requires you to write C++ code to do it.</li>
</ul>
<p>Pro's of clang vs Elsa:</p>
<ul>
<li>The Elsa community is extremely small and major development work seems
to have ceased in 2005, though it continues to be used by other small
projects
(e.g. Oink). Clang has a vibrant community including developers that
are paid to work on it full time. In practice this means that you can
file bugs against Clang and they will often be fixed for you. If you
use Elsa, you are (mostly) on your own for bug fixes and feature
enhancements.</li>
<li>Elsa is not built as a stack of reusable libraries like clang is. It is
very difficult to use part of Elsa without the whole front-end. For
example, you cannot use Elsa to parse C/ObjC code without building an
AST. You can do this in Clang and it is much faster than building an
AST.</li>
<li>Elsa does not have an integrated preprocessor, which makes it extremely
difficult to accurately map from a source location in the AST back to
its original position before preprocessing. Like GCC, it does not keep
track of macro expansions.</li>
<li>Elsa is even slower and uses more memory than GCC, which itself requires
far more space and time than clang.</li>
<li>Elsa only does partial semantic analysis. It is intended to work on
code that is already validated by GCC, so it does not do many semantic
checks required by the languages it implements.</li>
<li>Elsa does not support Objective-C.</li>
<li>Elsa does not support native code generation.</li>
</ul>
<p>Note that there is a fork of Elsa known as "Pork". It addresses some of
these shortcomings by loosely integrating a preprocessor. This allows it
to map from a source location in the AST to the original position before
preprocessing, providing it better support for static analysis and
refactoring. Note that Pork is in stasis now too.</p>
<!--=====================================================================-->
<h2><a name="pcc">Clang vs PCC (Portable C Compiler)</a></h2>
<!--=====================================================================-->
<p>Pro's of PCC vs clang:</p>
<ul>
<li>The PCC source base is very small and builds quickly with just a C
compiler.</li>
</ul>
<p>Pro's of clang vs PCC:</p>
<ul>
<li>PCC dates from the 1970's and has been dormant for most of that time.
The clang + llvm communities are very active.</li>
<li>PCC doesn't support C99, Objective-C, and doesn't aim to support
C++.</li>
<li>PCC's code generation is very limited compared to LLVM. It produces very
inefficient code and does not support many important targets.</li>
<li>Like Elsa, PCC's does not have an integrated preprocessor, making it
extremely difficult to use it for source analysis tools.</li>
</div>
</body>
</html>

Просмотреть файл

@ -1,23 +1,23 @@
html, body {
padding:0px;
font-size:small; font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, Helvetica, sans-serif; background-color: #fff; color: #222;
line-height:1.5;
}
h1, h2, h3, tt { color: #000 }
h1 { padding-top:0px; margin-top:0px;}
h2 { color:#333333; padding-top:0.5em; }
h3 { padding-top: 0.5em; margin-bottom: -0.25em; color:#2d58b7}
li { padding-bottom: 0.5em; }
ul { padding-left:1.5em; }
/* Slides */
IMG.img_slide {
display: block;
margin-left: auto;
margin-right: auto
}
/* Tables */
html, body {
padding:0px;
font-size:small; font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, Helvetica, sans-serif; background-color: #fff; color: #222;
line-height:1.5;
}
h1, h2, h3, tt { color: #000 }
h1 { padding-top:0px; margin-top:0px;}
h2 { color:#333333; padding-top:0.5em; }
h3 { padding-top: 0.5em; margin-bottom: -0.25em; color:#2d58b7}
li { padding-bottom: 0.5em; }
ul { padding-left:1.5em; }
/* Slides */
IMG.img_slide {
display: block;
margin-left: auto;
margin-right: auto
}
/* Tables */
tr { vertical-align:top }

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,15 +1,15 @@
This is for the LLVM+Clang browser based demo.
It is supposed to work like the LLVM+GCC demo here: http://llvm.org/demo/ but for the BSD licensed Clang instead.
Perhaps it could also be used for getting crash information and details on errors.... I'm not sure if this would require some major changes or not to report this info. Maybe also adding ways that people can use it to test for errors and a way to report such errors would also be good.
Status:
Anyways, right now, these file a basically just a copy of the LLVM+GCC demo (no changes have been made). The files don't even work right in this location on the server. As such, someone will need to edit the file or rewrite it.
If nobody in the LLVM community has the skills, one suggestion would be to post a request on a friendly Perl forum and see if anybody might be interested in taking on the challenge.
Alternatively, you could try a PHP, Python, Ruby, or Lisp mailing list and see if there are any takers who would be interested (and willing to do a rewrite to their language of choice).
--
BTW, once this feature was working, my intention was to link to it from the index.html page in the section entitled:
This is for the LLVM+Clang browser based demo.
It is supposed to work like the LLVM+GCC demo here: http://llvm.org/demo/ but for the BSD licensed Clang instead.
Perhaps it could also be used for getting crash information and details on errors.... I'm not sure if this would require some major changes or not to report this info. Maybe also adding ways that people can use it to test for errors and a way to report such errors would also be good.
Status:
Anyways, right now, these file a basically just a copy of the LLVM+GCC demo (no changes have been made). The files don't even work right in this location on the server. As such, someone will need to edit the file or rewrite it.
If nobody in the LLVM community has the skills, one suggestion would be to post a request on a friendly Perl forum and see if anybody might be interested in taking on the challenge.
Alternatively, you could try a PHP, Python, Ruby, or Lisp mailing list and see if there are any takers who would be interested (and willing to do a rewrite to their language of choice).
--
BTW, once this feature was working, my intention was to link to it from the index.html page in the section entitled:
Try Clang

Просмотреть файл

@ -1,30 +1,30 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Clang - Distributed Compilation Support</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
<style type="text/css">
</style>
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<!--*************************************************************************-->
<h1>Distributed Compilation Support in Clang</h1>
<!--*************************************************************************-->
<p>
This page tracks the status of Distributed Compilation support in Clang.<br>
Currently some basic features are working but the code is under heavy
development. </p>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Clang - Distributed Compilation Support</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
<style type="text/css">
</style>
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<!--*************************************************************************-->
<h1>Distributed Compilation Support in Clang</h1>
<!--*************************************************************************-->
<p>
This page tracks the status of Distributed Compilation support in Clang.<br>
Currently some basic features are working but the code is under heavy
development. </p>
</div>
</body>
</html>

Просмотреть файл

@ -1,173 +1,173 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Clang - Get Involved</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<h1>Getting Involved with the Clang Project</h1>
<p>Once you have <a href="get_started.html">checked out and built</a> clang and
played around with it, you might be wondering what you can do to make it better
and contribute to its development. Alternatively, maybe you just want to follow
the development of the project to see it progress.
</p>
<h2>Follow what's going on</h2>
<p>Clang is a subproject of the <a href="http://llvm.org">LLVM Project</a>, but
has its own mailing lists because the communities have people with different
interests. The two clang lists are:</p>
<ul>
<li><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits
</a> - This list is for patch submission/discussion.</li>
<li><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a> -
This list is for everything else clang related (questions and answers, bug
reports, etc).</li>
</ul>
<p>If you are interested in clang only, these two lists should be all
you need. If you are interested in the LLVM optimizer and code generator,
please consider signing up for <a
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">llvmdev</a> and <a
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
as well.</p>
<p>The best way to talk with other developers on the project is through the <a
href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev mailing
list</a>. The clang mailing list is a very friendly place and we welcome
newcomers. In addition to the cfe-dev list, a significant amount of design
discussion takes place on the <a
href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits mailing
list</a>. All of these lists have archives, so you can browse through previous
discussions or follow the list development on the web if you prefer.</p>
<h2>Open Projects</h2>
<p>Here are a few tasks that are available for newcomers to work on, depending
on what your interests are. This list is provided to generate ideas, it is not
intended to be comprehensive. Please ask on cfe-dev for more specifics or to
verify that one of these isn't already completed. :)</p>
<ul>
<li><b>Compile your favorite C/ObjC project with "clang -fsyntax-only"</b>:
the clang type checker and verifier is quite close to complete (but not bug
free!) for C and Objective C. We appreciate all reports of code that is
rejected by the front-end, and if you notice invalid code that is not rejected
by clang, that is also very important to us. For make-based projects,
the <a href="get_started.html#ccc"><code>ccc</code></a> script in clang's
<tt>utils</tt> folder might help to get you started.</li>
<li><b>Compile your favorite C project with "clang -emit-llvm"</b>:
The clang to LLVM converter is getting more mature, so you may be able to
compile it. If not, please let us know. Again,
<a href="get_started.html#ccc"><code>ccc</code></a> might help you. Once it
compiles it should run. If not, that's a bug :)</li>
<li><b>Debug Info Generation</b>: -emit-llvm doesn't fully support emission
of <a href="http://llvm.org/docs/SourceLevelDebugging.html">LLVM debug info</a>
(which the code generator turns into DWARF). The missing pieces are pretty
minor at this point.</li>
<li><b>Overflow detection</b>: an interesting project would be to add a -ftrapv
compilation mode that causes -emit-llvm to generate overflow tests for all
signed integer arithmetic operators, and call abort if they overflow. Overflow
is undefined in C and hard for people to reason about. LLVM IR also has
intrinsics for generating arithmetic with overflow checks directly.</li>
<li><b>Undefined behavior checking</b>: similar to adding -ftrapv, codegen could
insert runtime checks for all sorts of different undefined behaviors, from
reading uninitialized variables, buffer overflows, and many other things. This
checking would be expensive, but the optimizers could eliminate many of the
checks in some cases, and it would be very interesting to test code in this mode
for certain crowds of people. Because the inserted code is coming from clang,
the "abort" message could be very detailed about exactly what went wrong.</li>
<li><b>Continue work on C++ support</b>: Implementing all of C++ is a very big
job, but there are lots of little pieces that can be picked off and implemented.
See the <a href="cxx_status.html">C++ status report page</a> to find out what is
missing and what is already at least partially supported.</li>
<li><b>Improve target support</b>: The current target interfaces are heavily
stubbed out and need to be implemented fully. See the FIXME's in TargetInfo.
Additionally, the actual target implementations (instances of TargetInfoImpl)
also need to be completed. This includes defining builtin macros for linux
targets and other stuff like that.</li>
<li><b>Implement 'builtin' headers</b>: GCC provides a bunch of builtin headers,
such as stdbool.h, iso646.h, float.h, limits.h, etc. It also provides a bunch
of target-specific headers like altivec.h and xmmintrin.h. clang will
eventually need to provide its own copies of these (and there is a <a href=
"http://lists.cs.uiuc.edu/pipermail/cfe-dev/2007-December/000560.html">lot of
improvement</a> that can be made to the GCC ones!) that are clean-room
implemented to avoid GPL taint.</li>
<li><b>Implement a clang 'libgcc'</b>: As with the headers, clang (or a another
related subproject of llvm) will need to implement the features that libgcc
provides. libgcc provides a bunch of routines the code generator uses for
"fallback" when the chip doesn't support some operation (e.g. 64-bit divide on
a 32-bit chip). It also provides software floating point support and many other
things. I don't think that there is a specific licensing reason to reimplement
libgcc, but there is a lot of room for improvement in it in many
dimensions.</li>
<li><b>Implement an tool to generate code documentation</b>: Clang's
library-based design allows it to be used by a variety of tools that reason
about source code. One great application of Clang would be to build an
auto-documentation system like doxygen that generates code documentation from
source code. The advantage of using Clang for such a tool is that the tool would
use the same preprocessor/parser/ASTs as the compiler itself, giving it a very
rich understanding of the code.</li>
<li><b>Use clang libraries to implement better versions of existing tools</b>:
Clang is built as a set of libraries, which means that it is possible to
implement capabilities similar to other source language tools, improving them
in various ways. Two examples are <a href="http://distcc.samba.org/">distcc</a>
and the <a href="http://delta.tigris.org/">delta testcase reduction tool</a>.
The former can be improved to scale better and be more efficient. The later
could also be faster and more efficient at reducing C-family programs if built
on the clang preprocessor.</li>
<li><b>Use clang libraries to extend Ragel with a JIT</b>: <a
href="http://research.cs.queensu.ca/~thurston/ragel/">Ragel</a> is a state
machine compiler that lets you embed C code into state machines and generate
C code. It would be relatively easy to turn this into a JIT compiler using
LLVM.</li>
<li><b>Self-testing using clang</b>: There are several neat ways to
improve the quality of clang by self-testing. Some examples:
<ul>
<li>Improve the reliability of AST printing and serialization by
ensuring that the AST produced by clang on an input doesn't change
when it is reparsed or unserialized.
<li>Improve parser reliability and error generation by automatically
or randomly changing the input checking that clang doesn't crash and
that it doesn't generate excessive errors for small input
changes. Manipulating the input at both the text and token levels is
likely to produce interesting test cases.
</ul>
</li>
</ul>
<p>If you hit a bug with clang, it is very useful for us if you reduce the code
that demonstrates the problem down to something small. There are many ways to
do this; ask on cfe-dev for advice.</p>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Clang - Get Involved</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<h1>Getting Involved with the Clang Project</h1>
<p>Once you have <a href="get_started.html">checked out and built</a> clang and
played around with it, you might be wondering what you can do to make it better
and contribute to its development. Alternatively, maybe you just want to follow
the development of the project to see it progress.
</p>
<h2>Follow what's going on</h2>
<p>Clang is a subproject of the <a href="http://llvm.org">LLVM Project</a>, but
has its own mailing lists because the communities have people with different
interests. The two clang lists are:</p>
<ul>
<li><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits
</a> - This list is for patch submission/discussion.</li>
<li><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a> -
This list is for everything else clang related (questions and answers, bug
reports, etc).</li>
</ul>
<p>If you are interested in clang only, these two lists should be all
you need. If you are interested in the LLVM optimizer and code generator,
please consider signing up for <a
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">llvmdev</a> and <a
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
as well.</p>
<p>The best way to talk with other developers on the project is through the <a
href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev mailing
list</a>. The clang mailing list is a very friendly place and we welcome
newcomers. In addition to the cfe-dev list, a significant amount of design
discussion takes place on the <a
href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits mailing
list</a>. All of these lists have archives, so you can browse through previous
discussions or follow the list development on the web if you prefer.</p>
<h2>Open Projects</h2>
<p>Here are a few tasks that are available for newcomers to work on, depending
on what your interests are. This list is provided to generate ideas, it is not
intended to be comprehensive. Please ask on cfe-dev for more specifics or to
verify that one of these isn't already completed. :)</p>
<ul>
<li><b>Compile your favorite C/ObjC project with "clang -fsyntax-only"</b>:
the clang type checker and verifier is quite close to complete (but not bug
free!) for C and Objective C. We appreciate all reports of code that is
rejected by the front-end, and if you notice invalid code that is not rejected
by clang, that is also very important to us. For make-based projects,
the <a href="get_started.html#ccc"><code>ccc</code></a> script in clang's
<tt>utils</tt> folder might help to get you started.</li>
<li><b>Compile your favorite C project with "clang -emit-llvm"</b>:
The clang to LLVM converter is getting more mature, so you may be able to
compile it. If not, please let us know. Again,
<a href="get_started.html#ccc"><code>ccc</code></a> might help you. Once it
compiles it should run. If not, that's a bug :)</li>
<li><b>Debug Info Generation</b>: -emit-llvm doesn't fully support emission
of <a href="http://llvm.org/docs/SourceLevelDebugging.html">LLVM debug info</a>
(which the code generator turns into DWARF). The missing pieces are pretty
minor at this point.</li>
<li><b>Overflow detection</b>: an interesting project would be to add a -ftrapv
compilation mode that causes -emit-llvm to generate overflow tests for all
signed integer arithmetic operators, and call abort if they overflow. Overflow
is undefined in C and hard for people to reason about. LLVM IR also has
intrinsics for generating arithmetic with overflow checks directly.</li>
<li><b>Undefined behavior checking</b>: similar to adding -ftrapv, codegen could
insert runtime checks for all sorts of different undefined behaviors, from
reading uninitialized variables, buffer overflows, and many other things. This
checking would be expensive, but the optimizers could eliminate many of the
checks in some cases, and it would be very interesting to test code in this mode
for certain crowds of people. Because the inserted code is coming from clang,
the "abort" message could be very detailed about exactly what went wrong.</li>
<li><b>Continue work on C++ support</b>: Implementing all of C++ is a very big
job, but there are lots of little pieces that can be picked off and implemented.
See the <a href="cxx_status.html">C++ status report page</a> to find out what is
missing and what is already at least partially supported.</li>
<li><b>Improve target support</b>: The current target interfaces are heavily
stubbed out and need to be implemented fully. See the FIXME's in TargetInfo.
Additionally, the actual target implementations (instances of TargetInfoImpl)
also need to be completed. This includes defining builtin macros for linux
targets and other stuff like that.</li>
<li><b>Implement 'builtin' headers</b>: GCC provides a bunch of builtin headers,
such as stdbool.h, iso646.h, float.h, limits.h, etc. It also provides a bunch
of target-specific headers like altivec.h and xmmintrin.h. clang will
eventually need to provide its own copies of these (and there is a <a href=
"http://lists.cs.uiuc.edu/pipermail/cfe-dev/2007-December/000560.html">lot of
improvement</a> that can be made to the GCC ones!) that are clean-room
implemented to avoid GPL taint.</li>
<li><b>Implement a clang 'libgcc'</b>: As with the headers, clang (or a another
related subproject of llvm) will need to implement the features that libgcc
provides. libgcc provides a bunch of routines the code generator uses for
"fallback" when the chip doesn't support some operation (e.g. 64-bit divide on
a 32-bit chip). It also provides software floating point support and many other
things. I don't think that there is a specific licensing reason to reimplement
libgcc, but there is a lot of room for improvement in it in many
dimensions.</li>
<li><b>Implement an tool to generate code documentation</b>: Clang's
library-based design allows it to be used by a variety of tools that reason
about source code. One great application of Clang would be to build an
auto-documentation system like doxygen that generates code documentation from
source code. The advantage of using Clang for such a tool is that the tool would
use the same preprocessor/parser/ASTs as the compiler itself, giving it a very
rich understanding of the code.</li>
<li><b>Use clang libraries to implement better versions of existing tools</b>:
Clang is built as a set of libraries, which means that it is possible to
implement capabilities similar to other source language tools, improving them
in various ways. Two examples are <a href="http://distcc.samba.org/">distcc</a>
and the <a href="http://delta.tigris.org/">delta testcase reduction tool</a>.
The former can be improved to scale better and be more efficient. The later
could also be faster and more efficient at reducing C-family programs if built
on the clang preprocessor.</li>
<li><b>Use clang libraries to extend Ragel with a JIT</b>: <a
href="http://research.cs.queensu.ca/~thurston/ragel/">Ragel</a> is a state
machine compiler that lets you embed C code into state machines and generate
C code. It would be relatively easy to turn this into a JIT compiler using
LLVM.</li>
<li><b>Self-testing using clang</b>: There are several neat ways to
improve the quality of clang by self-testing. Some examples:
<ul>
<li>Improve the reliability of AST printing and serialization by
ensuring that the AST produced by clang on an input doesn't change
when it is reparsed or unserialized.
<li>Improve parser reliability and error generation by automatically
or randomly changing the input checking that clang doesn't crash and
that it doesn't generate excessive errors for small input
changes. Manipulating the input at both the text and token levels is
likely to produce interesting test cases.
</ul>
</li>
</ul>
<p>If you hit a bug with clang, it is very useful for us if you reduce the code
that demonstrates the problem down to something small. There are many ways to
do this; ask on cfe-dev for advice.</p>
</div>
</body>
</html>

Просмотреть файл

@ -1,101 +1,101 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Hacking on clang</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<!--*********************************************************************-->
<h1>Hacking on Clang</h1>
<!--*********************************************************************-->
<p>This document provides some hints for how to get started hacking
on Clang for developers who are new to the Clang and/or LLVM
codebases.</p>
<ul>
<li><a href="#docs">Developer Documentation</a></li>
<li><a href="#debugging">Debugging</a></li>
<li><a href="#testing">Testing</a></li>
<li><a href="#irgen">LLVM IR Generation</a></li>
</ul>
<!--=====================================================================-->
<h2 id="docs">Developer Documentation</h2>
<!--=====================================================================-->
<p>Both Clang and LLVM use doxygen to provide API documentation. Their
respective web pages (generated nightly) are here:</p>
<ul>
<li><a href="http://clang.llvm.org/doxygen">Clang</a></li>
<li><a href="http://llvm.org/doxygen">LLVM</a></li>
</ul>
<p>For work on the LLVM IR generation, the LLVM assembly language
<a href="http://llvm.org/docs/LangRef.html">reference manual</a> is
also useful.</p>
<!--=====================================================================-->
<h2 id="debugging">Debugging</h2>
<!--=====================================================================-->
<p>Inspecting data structures in a debugger:</p>
<ul>
<li>Many LLVM and Clang data structures provide
a <tt>dump()</tt> method which will print a description of the
data structure to <tt>stderr</tt>.</li>
<li>The <a href="docs/InternalsManual.html#QualType"><tt>QualType</tt></a>
structure is used pervasively. This is a simple value class for
wrapping types with qualifiers; you can use
the <tt>isConstQualified()</tt>, for example, to get one of the
qualifiers, and the <tt>getTypePtr()</tt> method to get the
wrapped <tt>Type*</tt> which you can then dump.</li>
</ul>
<!--=====================================================================-->
<h2 id="testing">Testing</h2>
<!--=====================================================================-->
<p>Clang includes a basic regression suite in the tree which can be
run with <tt>make test</tt> from the top-level clang directory, or
just <tt>make</tt> in the <em>test</em> sub-directory. <tt>make
report</tt> can be used after running the tests to summarize the
results, and <tt>make VERBOSE=1</tt> can be used to show more detail
about what is being run.</p>
<p>The regression suite can also be run with Valgrind by running
<tt>make test VG=1</tt> in the top-level clang directory.</p>
<p>For more intensive changes, running
the <a href="http://llvm.org/docs/TestingGuide.html#testsuiterun">LLVM
Test Suite</a> with clang is recommended. Currently the best way to
override LLVMGCC, as in: <tt>make LLVMGCC="ccc -std=gnu89"
TEST=nightly report</tt> (make sure ccc is in your PATH or use the
full path).</p>
<!--=====================================================================-->
<h2 id="irgen">LLVM IR Generation</h2>
<!--=====================================================================-->
<p>The LLVM IR generation part of clang handles conversion of the
AST nodes output by the Sema module to the LLVM Intermediate
Representation (IR). Historically, this was referred to as
"codegen", and the Clang code for this lives
in <tt>lib/CodeGen</tt>.</p>
<p>The output is most easily inspected using the <tt>-emit-llvm</tt>
option to clang (possibly in conjunction with <tt>-o -</tt>). You
can also use <tt>-emit-llvm-bc</tt> to write an LLVM bitcode file
which can be processed by the suite of LLVM tools
like <tt>llvm-dis</tt>, <tt>llvm-nm</tt>, etc. See the LLVM
<a href="http://llvm.org/docs/CommandGuide/">Command Guide</a>
for more information.</p>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Hacking on clang</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<!--*********************************************************************-->
<h1>Hacking on Clang</h1>
<!--*********************************************************************-->
<p>This document provides some hints for how to get started hacking
on Clang for developers who are new to the Clang and/or LLVM
codebases.</p>
<ul>
<li><a href="#docs">Developer Documentation</a></li>
<li><a href="#debugging">Debugging</a></li>
<li><a href="#testing">Testing</a></li>
<li><a href="#irgen">LLVM IR Generation</a></li>
</ul>
<!--=====================================================================-->
<h2 id="docs">Developer Documentation</h2>
<!--=====================================================================-->
<p>Both Clang and LLVM use doxygen to provide API documentation. Their
respective web pages (generated nightly) are here:</p>
<ul>
<li><a href="http://clang.llvm.org/doxygen">Clang</a></li>
<li><a href="http://llvm.org/doxygen">LLVM</a></li>
</ul>
<p>For work on the LLVM IR generation, the LLVM assembly language
<a href="http://llvm.org/docs/LangRef.html">reference manual</a> is
also useful.</p>
<!--=====================================================================-->
<h2 id="debugging">Debugging</h2>
<!--=====================================================================-->
<p>Inspecting data structures in a debugger:</p>
<ul>
<li>Many LLVM and Clang data structures provide
a <tt>dump()</tt> method which will print a description of the
data structure to <tt>stderr</tt>.</li>
<li>The <a href="docs/InternalsManual.html#QualType"><tt>QualType</tt></a>
structure is used pervasively. This is a simple value class for
wrapping types with qualifiers; you can use
the <tt>isConstQualified()</tt>, for example, to get one of the
qualifiers, and the <tt>getTypePtr()</tt> method to get the
wrapped <tt>Type*</tt> which you can then dump.</li>
</ul>
<!--=====================================================================-->
<h2 id="testing">Testing</h2>
<!--=====================================================================-->
<p>Clang includes a basic regression suite in the tree which can be
run with <tt>make test</tt> from the top-level clang directory, or
just <tt>make</tt> in the <em>test</em> sub-directory. <tt>make
report</tt> can be used after running the tests to summarize the
results, and <tt>make VERBOSE=1</tt> can be used to show more detail
about what is being run.</p>
<p>The regression suite can also be run with Valgrind by running
<tt>make test VG=1</tt> in the top-level clang directory.</p>
<p>For more intensive changes, running
the <a href="http://llvm.org/docs/TestingGuide.html#testsuiterun">LLVM
Test Suite</a> with clang is recommended. Currently the best way to
override LLVMGCC, as in: <tt>make LLVMGCC="ccc -std=gnu89"
TEST=nightly report</tt> (make sure ccc is in your PATH or use the
full path).</p>
<!--=====================================================================-->
<h2 id="irgen">LLVM IR Generation</h2>
<!--=====================================================================-->
<p>The LLVM IR generation part of clang handles conversion of the
AST nodes output by the Sema module to the LLVM Intermediate
Representation (IR). Historically, this was referred to as
"codegen", and the Clang code for this lives
in <tt>lib/CodeGen</tt>.</p>
<p>The output is most easily inspected using the <tt>-emit-llvm</tt>
option to clang (possibly in conjunction with <tt>-o -</tt>). You
can also use <tt>-emit-llvm-bc</tt> to write an LLVM bitcode file
which can be processed by the suite of LLVM tools
like <tt>llvm-dis</tt>, <tt>llvm-nm</tt>, etc. See the LLVM
<a href="http://llvm.org/docs/CommandGuide/">Command Guide</a>
for more information.</p>
</div>
</body>
</html>

Просмотреть файл

@ -1,120 +1,120 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>"clang" C Language Family Frontend for LLVM</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<!--*********************************************************************-->
<h1>clang: a C language family frontend for LLVM</h1>
<!--*********************************************************************-->
<p>The goal of the Clang project is to create a new C, C++, Objective C and
Objective C++ front-end for the <a href="http://www.llvm.org/">LLVM</a>
compiler. You can <a href="get_started.html">get and build</a> the source
today.</p>
<!--=====================================================================-->
<h2 id="goals">Features and Goals</h2>
<!--=====================================================================-->
<p>Some of the goals for the project include the following:</p>
<p><b><a href="features.html#enduser">End-User Features</a></b>:</p>
<ul>
<li>Fast compiles and low memory use</li>
<li>Expressive diagnostics</li>
<li>GCC compatibility</li>
</ul>
<p><b><a href="features.html#applications">Utility and
Applications</a></b>:</p>
<ul>
<li>Modular library based architecture</li>
<li>Support diverse clients (refactoring, static analysis, code generation,
etc)</li>
<li>Allow tight integration with IDEs</li>
<li>Use the LLVM 'BSD' License</li>
</ul>
<p><b><a href="features.html#design">Internal Design and
Implementation</a></b>:</p>
<ul>
<li>A real-world, production quality compiler</li>
<li>A simple and hackable code base</li>
<li>A single unified parser for C, Objective C, C++, and Objective C++</li>
<li>Conformance with C/C++/ObjC and their variants</li>
</ul>
<p>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 <a
href="features.html">Features</a> section, which breaks
each of these down and explains them in more detail.</p>
<!--=====================================================================-->
<h2>Why?</h2>
<!--=====================================================================-->
<p>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.</p>
<p>A good (but quite dated) introduction to Clang can be found in the
following video lectures:</p>
<ul>
<li><a href="clang_video-05-25-2007.html">Clang Introduction</a>
(May 2007)</li>
<li><a href="clang_video-07-25-2007.html">Features and Performance of
Clang</a> (July 2007)</li>
</ul>
<p>For a more detailed comparison between Clang and other compilers, please
see the <a href="comparison.html">clang comparison page</a>.</p>
<!--=====================================================================-->
<h2>Current Status</h2>
<!--=====================================================================-->
<p>Clang is still in early development stages. If you are looking for
source analysis or source-to-source transformation tools, clang is probably
a great solution for you. If you want to use it as a drop in C compiler, it
is not yet ready.</p>
<p>Clang currently has pretty good parsing and semantic analysis support for
C and Objective-C right now, and bugs are usually quickly fixed once
reported. <a href="cxx_status.html">C++ support</a> is still very early,
and we don't expect to have respectable C++ support for another 2 years
or so.</p>
<!--=====================================================================-->
<h2>Get it and get involved!</h2>
<!--=====================================================================-->
<p>Start by <a href="get_started.html">getting the code, building it, and
playing with it</a>. 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. :)</p>
<p>Once you've done that, please consider <a href="get_involved.html">getting
involved in the clang community</a>. 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.</p>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>"clang" C Language Family Frontend for LLVM</title>
<link type="text/css" rel="stylesheet" href="menu.css" />
<link type="text/css" rel="stylesheet" href="content.css" />
</head>
<body>
<!--#include virtual="menu.html.incl"-->
<div id="content">
<!--*********************************************************************-->
<h1>clang: a C language family frontend for LLVM</h1>
<!--*********************************************************************-->
<p>The goal of the Clang project is to create a new C, C++, Objective C and
Objective C++ front-end for the <a href="http://www.llvm.org/">LLVM</a>
compiler. You can <a href="get_started.html">get and build</a> the source
today.</p>
<!--=====================================================================-->
<h2 id="goals">Features and Goals</h2>
<!--=====================================================================-->
<p>Some of the goals for the project include the following:</p>
<p><b><a href="features.html#enduser">End-User Features</a></b>:</p>
<ul>
<li>Fast compiles and low memory use</li>
<li>Expressive diagnostics</li>
<li>GCC compatibility</li>
</ul>
<p><b><a href="features.html#applications">Utility and
Applications</a></b>:</p>
<ul>
<li>Modular library based architecture</li>
<li>Support diverse clients (refactoring, static analysis, code generation,
etc)</li>
<li>Allow tight integration with IDEs</li>
<li>Use the LLVM 'BSD' License</li>
</ul>
<p><b><a href="features.html#design">Internal Design and
Implementation</a></b>:</p>
<ul>
<li>A real-world, production quality compiler</li>
<li>A simple and hackable code base</li>
<li>A single unified parser for C, Objective C, C++, and Objective C++</li>
<li>Conformance with C/C++/ObjC and their variants</li>
</ul>
<p>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 <a
href="features.html">Features</a> section, which breaks
each of these down and explains them in more detail.</p>
<!--=====================================================================-->
<h2>Why?</h2>
<!--=====================================================================-->
<p>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.</p>
<p>A good (but quite dated) introduction to Clang can be found in the
following video lectures:</p>
<ul>
<li><a href="clang_video-05-25-2007.html">Clang Introduction</a>
(May 2007)</li>
<li><a href="clang_video-07-25-2007.html">Features and Performance of
Clang</a> (July 2007)</li>
</ul>
<p>For a more detailed comparison between Clang and other compilers, please
see the <a href="comparison.html">clang comparison page</a>.</p>
<!--=====================================================================-->
<h2>Current Status</h2>
<!--=====================================================================-->
<p>Clang is still in early development stages. If you are looking for
source analysis or source-to-source transformation tools, clang is probably
a great solution for you. If you want to use it as a drop in C compiler, it
is not yet ready.</p>
<p>Clang currently has pretty good parsing and semantic analysis support for
C and Objective-C right now, and bugs are usually quickly fixed once
reported. <a href="cxx_status.html">C++ support</a> is still very early,
and we don't expect to have respectable C++ support for another 2 years
or so.</p>
<!--=====================================================================-->
<h2>Get it and get involved!</h2>
<!--=====================================================================-->
<p>Start by <a href="get_started.html">getting the code, building it, and
playing with it</a>. 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. :)</p>
<p>Once you've done that, please consider <a href="get_involved.html">getting
involved in the clang community</a>. 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.</p>
</div>
</body>
</html>

Просмотреть файл

@ -1,39 +1,39 @@
/***************/
/* page layout */
/***************/
[id=menu] {
position:fixed;
width:25ex;
}
[id=content] {
/* ***** EDIT THIS VALUE IF CONTENT OVERLAPS MENU ***** */
position:absolute;
left:29ex;
padding-right:4ex;
}
/**************/
/* menu style */
/**************/
#menu .submenu {
padding-top:1em;
display:block;
}
#menu label {
display:block;
font-weight: bold;
text-align: center;
background-color: rgb(192,192,192);
}
#menu a {
padding:0 .2em;
display:block;
text-align: center;
background-color: rgb(235,235,235);
}
#menu a:visited {
color:rgb(100,50,100);
/***************/
/* page layout */
/***************/
[id=menu] {
position:fixed;
width:25ex;
}
[id=content] {
/* ***** EDIT THIS VALUE IF CONTENT OVERLAPS MENU ***** */
position:absolute;
left:29ex;
padding-right:4ex;
}
/**************/
/* menu style */
/**************/
#menu .submenu {
padding-top:1em;
display:block;
}
#menu label {
display:block;
font-weight: bold;
text-align: center;
background-color: rgb(192,192,192);
}
#menu a {
padding:0 .2em;
display:block;
text-align: center;
background-color: rgb(235,235,235);
}
#menu a:visited {
color:rgb(100,50,100);
}

Просмотреть файл

@ -1,42 +1,42 @@
<div id="menu">
<div>
<a href="http://llvm.org/">LLVM Home</a>
</div>
<div class="submenu">
<label>Clang Info</label>
<a href="/index.html">About</a>
<a href="/features.html">Features</a>
<a href="/comparison.html">Comparisons</a>
<a href="/get_started.html">Get&nbsp;Started</a>
<a href="/get_involved.html">Get&nbsp;Involved</a>
<a href="/cxx_status.html">C++ Status</a>
<a href="/docs/LanguageExtensions.html">Language&nbsp;Extensions</a>
<a href="/docs/InternalsManual.html">Clang&nbsp;Internals</a>
<a href="/hacking.html">Hacking on Clang</a>
<a href="/performance.html">Performance</a>
</div>
<div class="submenu">
<label>Clang Tools</label>
<a href="/StaticAnalysis.html">Automatic Bug-Finding</a>
</div>
<div class="submenu">
<label>Quick Links</label>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits</a>
<a href="http://llvm.org/bugs/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/cfe/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/">Browse ViewVC</a>
<a href="http://clang.llvm.org/doxygen/">doxygen</a>
<a href="http://t1.minormatter.com/~ddunbar/references.html">Spec. References</a>
<!-- <a href="http://keeda.stanford.edu/~ddunbar/clang/coverage/">Testing Coverage</a> -->
</div>
<div class="submenu">
<label>Events</label>
<a href="http://llvm.org/devmtg/">August 1, 2008 - LLVM/Clang Developer Meeting</a>
</div>
</div>
<div id="menu">
<div>
<a href="http://llvm.org/">LLVM Home</a>
</div>
<div class="submenu">
<label>Clang Info</label>
<a href="/index.html">About</a>
<a href="/features.html">Features</a>
<a href="/comparison.html">Comparisons</a>
<a href="/get_started.html">Get&nbsp;Started</a>
<a href="/get_involved.html">Get&nbsp;Involved</a>
<a href="/cxx_status.html">C++ Status</a>
<a href="/docs/LanguageExtensions.html">Language&nbsp;Extensions</a>
<a href="/docs/InternalsManual.html">Clang&nbsp;Internals</a>
<a href="/hacking.html">Hacking on Clang</a>
<a href="/performance.html">Performance</a>
</div>
<div class="submenu">
<label>Clang Tools</label>
<a href="/StaticAnalysis.html">Automatic Bug-Finding</a>
</div>
<div class="submenu">
<label>Quick Links</label>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits</a>
<a href="http://llvm.org/bugs/">Bug Reports</a>
<a href="http://llvm.org/svn/llvm-project/cfe/trunk/">Browse SVN</a>
<a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/">Browse ViewVC</a>
<a href="http://clang.llvm.org/doxygen/">doxygen</a>
<a href="http://t1.minormatter.com/~ddunbar/references.html">Spec. References</a>
<!-- <a href="http://keeda.stanford.edu/~ddunbar/clang/coverage/">Testing Coverage</a> -->
</div>
<div class="submenu">
<label>Events</label>
<a href="http://llvm.org/devmtg/">August 1, 2008 - LLVM/Clang Developer Meeting</a>
</div>
</div>