aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Sema/SemaCXXScopeSpec.cpp212
-rw-r--r--test/Parser/cxx-condition.cpp22
-rw-r--r--test/Parser/cxx-variadic-func.cpp10
-rw-r--r--test/SemaCXX/class-names.cpp104
-rw-r--r--test/SemaCXX/do-while-scope.cpp8
-rw-r--r--test/SemaCXX/function-type-qual.cpp46
-rw-r--r--test/SemaCXX/inherit.cpp64
-rw-r--r--www/clang_video-05-25-2007.html52
-rw-r--r--www/clang_video-07-25-2007.html58
-rw-r--r--www/comparison.html390
-rw-r--r--www/content.css44
-rw-r--r--www/cxx_status.html3412
-rw-r--r--www/demo/what is this directory.txt28
-rw-r--r--www/distclang_status.html60
-rw-r--r--www/get_involved.html346
-rw-r--r--www/hacking.html202
-rw-r--r--www/index.html240
-rw-r--r--www/menu.css76
-rw-r--r--www/menu.html.incl84
19 files changed, 2729 insertions, 2729 deletions
diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp
index 8a257f78c1..0d8844f95a 100644
--- a/lib/Sema/SemaCXXScopeSpec.cpp
+++ b/lib/Sema/SemaCXXScopeSpec.cpp
@@ -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());
+}
diff --git a/test/Parser/cxx-condition.cpp b/test/Parser/cxx-condition.cpp
index 9ffdf79ba0..2a77193f25 100644
--- a/test/Parser/cxx-condition.cpp
+++ b/test/Parser/cxx-condition.cpp
@@ -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; ) ;
+}
diff --git a/test/Parser/cxx-variadic-func.cpp b/test/Parser/cxx-variadic-func.cpp
index 0ef8684c1a..0e9c5ca285 100644
--- a/test/Parser/cxx-variadic-func.cpp
+++ b/test/Parser/cxx-variadic-func.cpp
@@ -1,5 +1,5 @@
-// RUN: clang -fsyntax-only %s
-
-void f(...) {
- int g(int(...));
-}
+// RUN: clang -fsyntax-only %s
+
+void f(...) {
+ int g(int(...));
+}
diff --git a/test/SemaCXX/class-names.cpp b/test/SemaCXX/class-names.cpp
index 8b01c89f39..1166b1016e 100644
--- a/test/SemaCXX/class-names.cpp
+++ b/test/SemaCXX/class-names.cpp
@@ -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 };
diff --git a/test/SemaCXX/do-while-scope.cpp b/test/SemaCXX/do-while-scope.cpp
index 94a3116c57..8adaadedc4 100644
--- a/test/SemaCXX/do-while-scope.cpp
+++ b/test/SemaCXX/do-while-scope.cpp
@@ -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);
}
diff --git a/test/SemaCXX/function-type-qual.cpp b/test/SemaCXX/function-type-qual.cpp
index b5487a9900..dd3e550e1d 100644
--- a/test/SemaCXX/function-type-qual.cpp
+++ b/test/SemaCXX/function-type-qual.cpp
@@ -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;
+};
diff --git a/test/SemaCXX/inherit.cpp b/test/SemaCXX/inherit.cpp
index 8ccecddaf6..cca1f8dec7 100644
--- a/test/SemaCXX/inherit.cpp
+++ b/test/SemaCXX/inherit.cpp
@@ -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}}
diff --git a/www/clang_video-05-25-2007.html b/www/clang_video-05-25-2007.html
index eb04761a93..ade0269f46 100644
--- a/www/clang_video-05-25-2007.html
+++ b/www/clang_video-05-25-2007.html
@@ -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> \ No newline at end of file
diff --git a/www/clang_video-07-25-2007.html b/www/clang_video-07-25-2007.html
index 53959ef367..d2225896c5 100644
--- a/www/clang_video-07-25-2007.html
+++ b/www/clang_video-07-25-2007.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> \ No newline at end of file
diff --git a/www/comparison.html b/www/comparison.html
index e873f73b61..fa853fb084 100644
--- a/www/comparison.html
+++ b/www/comparison.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 <