summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
committerdim <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
commit36c49e3f258dced101949edabd72e9bc3f1dedc4 (patch)
tree0bbe07708f7571f8b5291f6d7b96c102b7c99dee /www
parentfc84956ac8b7cd244ef30e7a4d4d38a58dec5904 (diff)
downloadFreeBSD-src-36c49e3f258dced101949edabd72e9bc3f1dedc4.zip
FreeBSD-src-36c49e3f258dced101949edabd72e9bc3f1dedc4.tar.gz
Vendor import of clang r114020 (from the release_28 branch):
http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor)
Diffstat (limited to 'www')
-rw-r--r--www/analyzer/latest_checker.html.incl2
-rw-r--r--www/compatibility.html75
-rw-r--r--www/cxx_status.html4
-rw-r--r--www/get_started.html2
-rw-r--r--www/hacking.html5
-rw-r--r--www/menu.html.incl2
6 files changed, 85 insertions, 5 deletions
diff --git a/www/analyzer/latest_checker.html.incl b/www/analyzer/latest_checker.html.incl
index 5f37473..76e569d 100644
--- a/www/analyzer/latest_checker.html.incl
+++ b/www/analyzer/latest_checker.html.incl
@@ -1 +1 @@
-<b><a href="/checker/checker-244.tar.bz2">checker-244.tar.bz2</a></b> (built July 8, 2010)
+<b><a href="/checker/checker-247.tar.bz2">checker-247.tar.bz2</a></b> (built July 30, 2010)
diff --git a/www/compatibility.html b/www/compatibility.html
index 0f8409b..cf0d96e 100644
--- a/www/compatibility.html
+++ b/www/compatibility.html
@@ -33,6 +33,7 @@
<ul>
<li><a href="#inline">C99 inline functions</a></li>
<li><a href="#lvalue-cast">Lvalue casts</a></li>
+ <li><a href="#blocks-in-protected-scope">Jumps to within <tt>__block</tt> variable scope</a></li>
</ul>
</li>
<li><a href="#objective-c">Objective-C compatibility</a>
@@ -58,6 +59,9 @@
<ul>
<li><a href="#implicit-downcasts">Implicit downcasts</a></li>
</ul>
+ <ul>
+ <li><a href="#Use of class as method name">Use of class as method name</a></li>
+ </ul>
</li>
</ul>
@@ -132,6 +136,55 @@ example, one could use:</p>
</pre>
<!-- ======================================================================= -->
+<h3 id="blocks-in-protected-scope">Jumps to within <tt>__block</tt> variable scope</h3>
+<!-- ======================================================================= -->
+
+<p>Clang disallows jumps into the scope of a <tt>__block</tt> variable, similar
+to the manner in which both GCC and Clang disallow jumps into the scope of
+variables which have user defined constructors (in C++).</p>
+
+<p>Variables marked with <tt>__block</tt> require special runtime initialization
+before they can be used. A jump into the scope of a <tt>__block</tt> variable
+would bypass this initialization and therefore the variable cannot safely be
+used.</p>
+
+<p>For example, consider the following code fragment:</p>
+
+<pre>
+int f0(int c) {
+ if (c)
+ goto error;
+
+ __block int x;
+ x = 1;
+ return x;
+
+ error:
+ x = 0;
+ return x;
+}
+</pre>
+
+<p>GCC accepts this code, but it will crash at runtime along the error path,
+because the runtime setup for the storage backing the <tt>x</tt> variable will
+not have been initialized. Clang rejects this code with a hard error:</p>
+
+<pre>
+t.c:3:5: error: goto into protected scope
+ goto error;
+ ^
+t.c:5:15: note: jump bypasses setup of __block variable
+ __block int x;
+ ^
+</pre>
+
+<p>Some instances of this construct may be safe if the variable is never used
+after the jump target, however the protected scope checker does not check the
+uses of the variable, only the scopes in which it is visible. You should rewrite
+your code to put the <tt>__block</tt> variables in a scope which is only visible
+where they are used.</p>
+
+<!-- ======================================================================= -->
<h2 id="objective-c">Objective-C compatibility</h3>
<!-- ======================================================================= -->
@@ -604,6 +657,28 @@ explicit cast:</p>
f((Derived *)base);
</pre>
+<!-- ======================================================================= -->
+<h3 id="Use of class as method name">Use of class as method name</h3>
+<!-- ======================================================================= -->
+
+<p>Use of 'class' name to declare a method is allowed in objective-c++ mode to
+be compatible with GCC. However, use of property dot syntax notation to call
+this method is not allowed in clang++, as [I class] is a suitable syntax that
+will work. So, this test will fail in clang++.
+
+<pre>
+@interface I {
+int cls;
+}
++ (int)class;
+@end
+
+@implementation I
+- (int) Meth { return I.class; }
+@end
+<pre>
+
+
</div>
</body>
</html>
diff --git a/www/cxx_status.html b/www/cxx_status.html
index 8fccc2a..7312c16 100644
--- a/www/cxx_status.html
+++ b/www/cxx_status.html
@@ -24,7 +24,7 @@
<!--*************************************************************************-->
<h1>C++ and C++'0x Support in Clang</h1>
<!--*************************************************************************-->
-<p>Last updated: $Date: 2010-05-21 23:16:21 +0200 (Fri, 21 May 2010) $</p>
+<p>Last updated: $Date: 2010-08-26 16:20:18 +0200 (Thu, 26 Aug 2010) $</p>
<ul>
<li><a href="#projects">Projects Building with Clang</a></li>
@@ -70,7 +70,7 @@
<td><a href="http://blog.llvm.org/2010/05/clang-builds-boost.html">Compiles
and passes regression tests</a> on Darwin/X86-64.</td>
<td>May 20, 2010</td>
- <td><a href="http://llvm.org/bugs/show_bug.cgi?id=6023">PR6023</a></td>
+ <td><a href="http://llvm.org/bugs/show_bug.cgi?id=6023"><del>PR6023</del></a></td>
</tr>
<tr>
<td><a href="http://qt.nokia.com">Qt</a></td>
diff --git a/www/get_started.html b/www/get_started.html
index 96979af..b64a5f2 100644
--- a/www/get_started.html
+++ b/www/get_started.html
@@ -76,7 +76,7 @@ follows:</p>
hard-coded paths" in <tt>clang/lib/Frontend/InitHeaderSearch.cpp</tt> and
change the lines below to include that path.</li>
</ul>
- <li>Try it out (assuming you add llvm/Debug/bin to your path):</li>
+ <li>Try it out (assuming you add llvm/Debug+Asserts/bin to your path):</li>
<ul>
<li><tt>clang --help</tt></li>
<li><tt>clang file.c -fsyntax-only</tt> (check for correctness)</li>
diff --git a/www/hacking.html b/www/hacking.html
index 07a0d6c..7bd718b 100644
--- a/www/hacking.html
+++ b/www/hacking.html
@@ -26,6 +26,7 @@
<ul>
<li><a href="#testingNonWindows">Testing on Unix-like Systems</a></li>
<li><a href="#testingWindows">Testing using Visual Studio on Windows</a></li>
+ <li><a href="#testingCommands">Testing on the Command Line</a></li>
</ul>
<li><a href="#patches">Creating Patch Files</a></li>
<li><a href="#irgen">LLVM IR Generation</a></li>
@@ -172,6 +173,10 @@
run the test from Visual Studio, right-click the clang-test project
and select "Build".</p>
+ <!--=====================================================================-->
+ <h3 id="testingCommands">Testing on the Command Line</h3>
+ <!--=====================================================================-->
+
<p>To run all the tests from the command line, execute a command like
the following:</p>
diff --git a/www/menu.html.incl b/www/menu.html.incl
index d115088..d828449 100644
--- a/www/menu.html.incl
+++ b/www/menu.html.incl
@@ -8,7 +8,7 @@
<a href="/index.html">About</a>
<a href="/features.html">Features</a>
<a href="/comparison.html">Comparisons</a>
- <a href="/docs/UsersManual.html">Users Manual</a>
+ <a href="/docs/UsersManual.html">User's Manual</a>
<a href="/compatibility.html">Language&nbsp;Compatibility</a>
<a href="/docs/LanguageExtensions.html">Language&nbsp;Extensions</a>
<a href="/cxx_status.html">C++ Status</a>
OpenPOWER on IntegriCloud