summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/analyzer/annotations.html3
-rw-r--r--www/analyzer/available_checks.html48
-rw-r--r--www/analyzer/content.css1
-rw-r--r--www/analyzer/faq.html120
-rw-r--r--www/analyzer/images/example_custom_assert.pngbin0 -> 23686 bytes
-rw-r--r--www/analyzer/images/example_null_pointer.pngbin0 -> 23580 bytes
-rw-r--r--www/analyzer/images/example_use_assert.pngbin0 -> 25513 bytes
-rw-r--r--www/analyzer/installation.html2
-rw-r--r--www/analyzer/latest_checker.html.incl2
-rw-r--r--www/analyzer/menu.html.incl5
-rw-r--r--www/analyzer/release_notes.html38
-rwxr-xr-xwww/builtins.py5
-rw-r--r--www/comparison.html2
-rw-r--r--www/content.css3
-rw-r--r--www/cxx_status.html28
-rw-r--r--www/diagnostics.html33
-rw-r--r--www/features.html16
-rw-r--r--www/get_started.html33
-rw-r--r--www/menu.html.incl1
19 files changed, 292 insertions, 48 deletions
diff --git a/www/analyzer/annotations.html b/www/analyzer/annotations.html
index 9e3583d..bb4bc44 100644
--- a/www/analyzer/annotations.html
+++ b/www/analyzer/annotations.html
@@ -541,7 +541,8 @@ some action that depends on that condition (e.g., dereferencing a pointer).</p>
<p>The analyzer knows about several well-known assertion handlers, but can
automatically infer if a function should be treated as an assertion handler if
it is annotated with the 'noreturn' attribute or the (Clang-specific)
-'analyzer_noreturn' attribute.</p>
+'analyzer_noreturn' attribute. Note that, currently, clang does not support
+these attributes on Objective-C methods and C++ methods.</p>
<h4 id="attr_noreturn">Attribute 'noreturn'</h4>
diff --git a/www/analyzer/available_checks.html b/www/analyzer/available_checks.html
index 3f40d32..3a902a3 100644
--- a/www/analyzer/available_checks.html
+++ b/www/analyzer/available_checks.html
@@ -74,9 +74,11 @@
<tr>
<td><b>deadcode.DeadStores</b></td><td>Check for values stored to variables that are never read afterwards.</td>
</tr>
+<!--
<tr>
<td><b>deadcode.IdempotentOperations</b></td><td>Warn about idempotent operations.</td>
</tr>
+-->
<tr>
<td><b>osx.API</b></td><td>Check for proper uses of various Mac OS X APIs.</td>
</tr>
@@ -108,6 +110,9 @@
<td><b>osx.cocoa.RetainCount</b></td><td>Check for leaks and improper reference count management.</td>
</tr>
<tr>
+<td><b>osx.cocoa.SelfInit</b></td><td>Check that 'self' is properly initialized inside an initializer method.</td>
+</tr>
+<tr>
<td><b>osx.cocoa.UnusedIvars</b></td><td>Warn about private ivars that are never used.</td>
</tr>
<tr>
@@ -122,9 +127,52 @@
<tr>
<td><b>osx.coreFoundation.CFRetainRelease</b></td><td>Check for null arguments to CFRetain/CFRelease.</td>
</tr>
+<td><b>osx.coreFoundation.containers.OutOfBounds</b></td><td>Checks for index out-of-bounds when using 'CFArray' API.</td>
+</tr>
+<tr>
+<td><b>osx.coreFoundation.containers.PointerSizedValues</b></td><td>Warns if 'CFArray', 'CFDictionary', 'CFSet' are created with non-pointer-size values.</td>
+</tr>
+<tr>
+<td><b>security.FloatLoopCounter</b></td><td>Warn on using a floating point value as a loop counter (CERT: FLP30-C, FLP30-CPP).</td>
+</tr>
+<tr>
+<td><b>security.insecureAPI.UncheckedReturn</b></td><td>Warn on uses of functions whose return values must be always checked.</td>
+</tr>
+<tr>
+<td><b>security.insecureAPI.getpw</b></td><td>Warn on uses of the 'getpw' function.</td>
+</tr>
+<tr>
+<td><b>security.insecureAPI.gets</b></td><td>Warn on uses of the 'gets' function.</td>
+</tr>
+<tr>
+<td><b>security.insecureAPI.mkstemp</b></td><td>Warn when 'mkstemp' is passed fewer than 6 X's in the format string.</td>
+</tr>
+<tr>
+<td><b>security.insecureAPI.mktemp</b></td><td>Warn on uses of the 'mktemp' function.</td>
+</tr>
+<tr>
+<td><b>security.insecureAPI.rand</b></td><td>Warn on uses of the 'rand', 'random', and related functions.</td>
+</tr>
+<tr>
+<td><b>security.insecureAPI.strcpy</b></td><td>Warn on uses of the 'strcpy' and 'strcat' functions.</td>
+</tr>
+<tr>
+<td><b>security.insecureAPI.vfork</b></td><td>Warn on uses of the 'vfork' function.</td>
+</tr>
<tr>
<td><b>unix.API</b></td><td>Check calls to various UNIX/Posix functions.</td>
</tr>
+<tr>
+<td><b>unix.Malloc</b></td><td>Check for memory leaks, double free, and use-after-free problems.</td>
+</tr>
+<tr>
+<td><b>unix.MallocSizeof</b></td><td>Check for dubious malloc arguments involving sizeof.</td>
+</tr>
+<tr>
+<td><b>unix.cstring.BadSizeArg</b></td><td>Check the size argument passed into C string functions for common erroneous patterns.</td>
+</tr>
+<tr>
+<td><b>unix.cstring.NullArg</b></td><td>Check for null pointers being passed as arguments to C string functions.</td>
</table>
<p>In addition to these the analyzer contains numerous experimental (beta) checkers.</p>
diff --git a/www/analyzer/content.css b/www/analyzer/content.css
index b22cca9..ea75fba 100644
--- a/www/analyzer/content.css
+++ b/www/analyzer/content.css
@@ -15,6 +15,7 @@ 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 }
h4 { color:#2d58b7 }
+h4.faq { color:#2d58b7 }
li { padding-bottom: 0.5em }
ul { padding-left:1.5em; }
diff --git a/www/analyzer/faq.html b/www/analyzer/faq.html
new file mode 100644
index 0000000..5c132b5
--- /dev/null
+++ b/www/analyzer/faq.html
@@ -0,0 +1,120 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>FAQ and How to Deal with Common False Positives</title>
+ <link type="text/css" rel="stylesheet" href="menu.css">
+ <link type="text/css" rel="stylesheet" href="content.css">
+ <script type="text/javascript" src="scripts/menu.js"></script>
+ <style type="text/css">
+ tr:first-child { width:20%; }
+ </style>
+</head>
+<body>
+
+<div id="page">
+<!--#include virtual="menu.html.incl"-->
+
+<div id="content">
+
+<h1>FAQ and How to Deal with Common False Positives</h1>
+
+<ol>
+ <li><a href="#custom_assert">How do I tell the analyzer that I do not want the bug being
+reported here since my custom error handler will safely end the execution before
+the bug is reached?</a></li>
+ <li><a href="#null_pointer">The analyzer reports a null dereference, but I know that the
+pointer is never null. How can I tell the analyzer that a pointer can never be
+null?</a></li>
+ <li><a href="#use_assert">The analyzer assumes that a loop body is never entered. How can I tell it that the loop body will be entered at least once?</a></li>
+ <li><a href="#suppress_issue">How can I suppress a specific analyzer warning?</a></li>
+ <li><a href="#exclude_code">How can I selectively exclude code the analyzer examines?</a></li>
+</ol>
+
+
+<h4 id="custom_assert" class="faq">Q: How do I tell the analyzer that I do not want the bug being
+reported here since my custom error handler will safely end the execution before
+the bug is reached?</h4>
+
+<img src="images/example_custom_assert.png" alt="example custom assert">
+
+<p>You can tell the analyzer that this path is unreachable by teaching it about your <a href = "annotations.html#custom_assertions" >custom assertion handlers</a>. For example, you can modify the code segment as following.</p>
+
+<pre class="code_example">
+void customAssert() <span class="code_highlight">__attribute__((analyzer_noreturn))</span>;
+int foo(int *b) {
+ if (!b)
+ customAssert();
+ return *b;
+}</pre>
+
+
+<h4 id="null_pointer" class="faq">Q: The analyzer reports a null dereference, but I know that the
+pointer is never null. How can I tell the analyzer that a pointer can never be
+null?</h4>
+
+<img src="images/example_null_pointer.png" alt="example null pointer">
+
+<p>The reason the analyzer often thinks that a pointer can be null is because the preceding code checked compared it against null. So if you are absolutely sure that it cannot be null, remove the preceding check and, preferably, add an assertion as well. For example, in the code segment above, it will be sufficient to remove the <tt>if (!b)</tt> check. </p>
+
+<pre class="code_example">
+void usePointer(int *b);
+int foo(int *b) {
+ usePointer(b);
+ return *b;
+}</pre>
+
+<h4 id="use_assert" class="faq">Q: The analyzer assumes that a loop body is never entered. How can I tell it that the loop body will be entered at least once?</h4>
+
+<img src="images/example_use_assert.png" alt="example use assert">
+
+<p>You can teach the analyzer facts about your code as well as document it by
+using assertions. In the contrived example above, the analyzer reports an error
+on the path which assumes that the loop is never entered. However, the owner of
+the code might know that the loop is always entered because the input parameter
+<tt>length</tt> is always greater than <tt>0</tt>. The false positive can be
+suppressed by asserting this knowledge, adding <tt>assert(length > 0)</tt> in
+the beginning of the function.</p>
+
+<pre class="code_example">
+int foo(int length) {
+ int x = 0;
+ <span class="code_highlight">assert(length > 0);</span>
+ for (int i = 0; i < length; i++)
+ x += 1;
+ return length/x;
+}
+</pre>
+
+<h4 id="suppress_issue" class="faq">Q: How can I suppress a specific analyzer warning?</h4>
+
+<p>There is currently no solid mechanism for suppressing an analyzer warning,
+although this is currently being investigated. When you encounter an analyzer
+bug/false positive, check if it's one of the issues discussed above or if the
+analyzer <a href = "annotations.html#custom_assertions" >annotations</a> can
+resolve the issue. Second, please <a href = "filing_bugs.html">report it</a> to
+help us improve user experience. As the last resort, consider using <tt>__clang_analyzer__</tt> macro
+<a href = "faq.html#exclude_code" >described below</a>.</p>
+
+<h4 id="exclude_code" class="faq">Q: How can I selectively exclude code the analyzer examines?</h4>
+
+<p>When the static analyzer is using clang to parse source files, it implicitly
+defines the preprocessor macro <tt>__clang_analyzer__</tt>. One can use this
+macro to selectively exclude code the analyzer examines. Here is an example:
+
+<pre class="code_example">
+#ifndef __clang_analyzer__
+// Code not to be analyzed
+#endif
+</pre>
+
+This usage is discouraged because it makes the code dead to the analyzer from
+now on. Instead, we prefer that users file bugs against the analyzer when it flags
+false positives.
+</p>
+
+</div>
+</div>
+</body>
+</html>
+
diff --git a/www/analyzer/images/example_custom_assert.png b/www/analyzer/images/example_custom_assert.png
new file mode 100644
index 0000000..a56bb89
--- /dev/null
+++ b/www/analyzer/images/example_custom_assert.png
Binary files differ
diff --git a/www/analyzer/images/example_null_pointer.png b/www/analyzer/images/example_null_pointer.png
new file mode 100644
index 0000000..defc394
--- /dev/null
+++ b/www/analyzer/images/example_null_pointer.png
Binary files differ
diff --git a/www/analyzer/images/example_use_assert.png b/www/analyzer/images/example_use_assert.png
new file mode 100644
index 0000000..9e46d76
--- /dev/null
+++ b/www/analyzer/images/example_use_assert.png
Binary files differ
diff --git a/www/analyzer/installation.html b/www/analyzer/installation.html
index ebccd07..2eb7937 100644
--- a/www/analyzer/installation.html
+++ b/www/analyzer/installation.html
@@ -93,7 +93,7 @@ source code</a>.<p>
<p>For example, if you built a <em>Debug+Asserts</em> build of LLVM/Clang (the
default), the resultant <tt>clang</tt> binary will be in <tt>$(OBJDIR)/Debug+Asserts/bin</tt>
(where <tt>$(OBJDIR)</tt> is often the same as the root source directory). You
-can also do <tt>make install</tt> to install the LLVM/Clang libaries and
+can also do <tt>make install</tt> to install the LLVM/Clang libraries and
binaries to the installation directory of your choice (specified when you run
<tt>configure</tt>).</p></li>
diff --git a/www/analyzer/latest_checker.html.incl b/www/analyzer/latest_checker.html.incl
index d1b0d06..74c6ab0 100644
--- a/www/analyzer/latest_checker.html.incl
+++ b/www/analyzer/latest_checker.html.incl
@@ -1 +1 @@
-<b><a href="http://bit.ly/GUmtVB">checker-263.tar.bz2</a></b> (built March 22, 2012)
+<b><a href="http://bit.ly/OIdyI7">checker-267.tar.bz2</a></b> (built June 1, 2012)
diff --git a/www/analyzer/menu.html.incl b/www/analyzer/menu.html.incl
index 53a4276..d1581a6 100644
--- a/www/analyzer/menu.html.incl
+++ b/www/analyzer/menu.html.incl
@@ -16,9 +16,10 @@
User Manual
<ul>
<li><a href="/installation.html">Obtaining the Analyzer</a></li>
- <li><a href="/scan-build.html">Command line usage</a></li>
+ <li><a href="/scan-build.html">Command Line Usage</a></li>
<li><a href="/xcode.html">Using within Xcode</a></li>
<li><a href="/available_checks.html">Available Checks</a></li>
+ <li><a href="/faq.html">FAQ</a></li>
<li><a href="/annotations.html">Source-level Annotations</a></li>
</ul>
</li>
@@ -26,7 +27,7 @@
Development
<ul>
<li><a href="/checker_dev_manual.html">Checker Developer Manual</a></li>
- <li><a href="/dev_cxx.html">Analysis support for C++</a></li>
+ <li><a href="/dev_cxx.html">Analysis Support for C++</a></li>
</ul>
</li>
<li>
diff --git a/www/analyzer/release_notes.html b/www/analyzer/release_notes.html
index 42de9dd..79f0e0d 100644
--- a/www/analyzer/release_notes.html
+++ b/www/analyzer/release_notes.html
@@ -15,10 +15,42 @@
<h1>Release notes for <tt>checker-XXX</tt> builds</h1>
+<h4 id="checker_267">checker-267</h4>
+<p><b>built:</b> June 1, 2012</br>
+ <b>download:</b> <a href="http://bit.ly/OIdyI7">checker-267.tar.bz2</a></p>
+ <p><b>highlights:</b></p>
+
+<p>Adds basic interprocedural analysis support for blocks.</p>
+
+<h4 id="checker_266">checker-266</h4>
+<p><b>built:</b> May 23, 2012</br>
+ <b>download:</b> <a href="http://bit.ly/LgtUWx">checker-266.tar.bz2</a></p>
+ <p><b>highlights:</b></p>
+
+<p>Contains numerous stability fixes over checker-266, especially when analyzing C++11 code.</p>
+
+<h4 id="checker_265">checker-265</h4>
+<p><b>built:</b> May 8, 2012</br>
+ <b>download:</b> <a href="http://bit.ly/JceZBE">checker-265.tar.bz2</a></p>
+ <p><b>highlights:</b></p>
+
+<p>This release contains a fix for a major crasher introduced in checker-264, and various refinements to
+improve the precision and reduce the false positive rate of the analyzer. It also enables a new unix.MallocSizeof check, which reports
+inconsistencies between the casted type of the return value of a 'malloc/calloc/realloc' call and the operand
+of sizeof expressions contained within its argument(s).</p>
+
+<h4 id="checker_264">checker-264</h4>
+
+<p><b>built:</b> April 26, 2012</br>
+ <b>download:</b> <a href="http://bit.ly/JATSI8">checker-264.tar.bz2</a></p>
+ <p><b>highlights:</b></p>
+
+<p>This release contains misc. bug fixes and performance enhancements over checker-263, including
+ a reduction of some kinds of false positives related to the malloc() checker.</p>
+
<h4 id="checker_263">checker-263</h4>
<p><b>built:</b> March 22, 2012</br>
- <b>download:</b> <a href="http://bit.ly/GUmtVB">checker-263.tar.bz2</a></p>
<p><b>highlights:</b></p>
<ul>
@@ -28,7 +60,6 @@
<h4 id="checker_262">checker-262</h4>
<p><b>built: </b>March 15, 2012</br>
- <b>download:</b> <a href="http://bit.ly/xETQF0">checker-262.tar.bz2</a></p>
<p><b>highlights:</b></p>
<ul>
@@ -42,7 +73,6 @@
<h4 id="checker_261">checker-261</h4>
<p><b>built: </b>February 22, 2012<br>
-<b>download:</b> <a href="http://bit.ly/yN1Awv">checker-261.tar.bz2</a></p>
<p><b>highlights:</b></p>
<ul>
@@ -58,7 +88,6 @@
<h4 id="checker_260">checker-260</h4>
<p><b>built: </b>January 25, 2012<br>
-<b>download:</b> <a href="http://bit.ly/wpAqVP">checker-260.tar.bz2</a></p>
<p><b>highlights:</b></p>
<p>This is essentially the same as checker-259, but enables the following <i>experimental</i> checkers (please provide feedback):</p>
@@ -74,7 +103,6 @@
<h4 id="checker_259">checker-259</h4>
<p><b>built: </b>January 25, 2012<br>
-<b>download:</b> <a href="http://bit.ly/zOWf1P">checker-259.tar.bz2</a></p>
<p><b>highlights:</b></p>
<ul>
diff --git a/www/builtins.py b/www/builtins.py
index 5e85770..18f86ab 100755
--- a/www/builtins.py
+++ b/www/builtins.py
@@ -45,6 +45,7 @@ repl_map = {
'__builtin_ia32_xorpd': '_mm_xor_pd',
'__builtin_ia32_xorps': '_mm_xor_ps',
'__builtin_ia32_pxor128': '_mm_xor_si128',
+'__builtin_ia32_cvtps2dq': '_mm_cvtps_epi32',
'__builtin_ia32_cvtsd2ss': '_mm_cvtsd_ss',
'__builtin_ia32_cvtsi2sd': '_mm_cvtsi32_sd',
'__builtin_ia32_cvtss2sd': '_mm_cvtss_sd',
@@ -120,6 +121,8 @@ repl_map = {
'__builtin_ia32_pshufd': '_mm_shuffle_epi32',
'__builtin_ia32_movshdup': '_mm_movehdup_ps',
'__builtin_ia32_movsldup': '_mm_moveldup_ps',
+'__builtin_ia32_maxps': '_mm_max_ps',
+'__builtin_ia32_pslldi128': '_mm_slli_epi32',
'__builtin_ia32_vec_set_v16qi': '_mm_insert_epi8',
'__builtin_ia32_vec_set_v8hi': '_mm_insert_epi16',
'__builtin_ia32_vec_set_v4si': '_mm_insert_epi32',
@@ -157,4 +160,4 @@ for line in fileinput.input(inplace=1):
report_cant(unh)
sys.stdout.write(line)
-sys.exit(err) \ No newline at end of file
+sys.exit(err)
diff --git a/www/comparison.html b/www/comparison.html
index 2898ce8..58c4b31 100644
--- a/www/comparison.html
+++ b/www/comparison.html
@@ -50,8 +50,6 @@
<ul>
<li>GCC supports languages that clang does not aim to, such as Java, Ada,
FORTRAN, etc.</li>
- <li>GCC has a few <a href="cxx_status.html">C++'11 features</a> that Clang
- does not yet support.</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>
diff --git a/www/content.css b/www/content.css
index 574b98e..8572d7c 100644
--- a/www/content.css
+++ b/www/content.css
@@ -24,7 +24,10 @@ IMG.img_slide {
.itemTitle { color:#2d58b7 }
span.error { color:red }
+span.warning { color:purple }
+span.note { color:gray }
span.caret { color:green; font-weight:bold }
+span.template-highlight { color:cyan }
/* Tables */
tr { vertical-align:top }
diff --git a/www/cxx_status.html b/www/cxx_status.html
index 3ee6b72..50ec736 100644
--- a/www/cxx_status.html
+++ b/www/cxx_status.html
@@ -23,7 +23,7 @@
<!--*************************************************************************-->
<h1>C++98 and C++11 Support in Clang</h1>
<!--*************************************************************************-->
-<p>Last updated: $Date: 2012-04-17 03:04:22 +0200 (Tue, 17 Apr 2012) $</p>
+<p>Last updated: $Date: 2012-05-23 03:38:11 +0200 (Wed, 23 May 2012) $</p>
<h2 id="cxx98">C++98 implementation status</h2>
@@ -83,7 +83,7 @@ C++11 mode.</p>
<tr>
<td>Initializer lists</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">N2672</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Static assertions</td>
@@ -113,7 +113,7 @@ C++11 mode.</p>
<tr>
<td>Lambda expressions</td>
<td><a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf">N2927</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Declared type of an expression</td>
@@ -123,7 +123,7 @@ C++11 mode.</p>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;Incomplete return types</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf">N3276</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Right angle brackets</td>
@@ -164,7 +164,7 @@ C++11 mode.</p>
<td>Forward declarations for enums</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf">N2764</a>
<br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1206">DR1206</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Generalized attributes</td>
@@ -174,7 +174,7 @@ C++11 mode.</p>
<tr>
<td>Generalized constant expressions</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">N2235</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Alignment support</td>
@@ -216,12 +216,12 @@ C++11 mode.</p>
<tr>
<td>Universal character names in literals</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html">N2170</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>User-defined literals</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">N2765</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Standard Layout Types</td>
@@ -247,7 +247,7 @@ C++11 mode.</p>
<td>Extending <code>sizeof</code></td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html">N2253</a>
<br><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#850">DR850</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Inline namespaces</td>
@@ -257,7 +257,7 @@ C++11 mode.</p>
<tr>
<td>Unrestricted unions</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf">N2544</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Local and unnamed types as template arguments</td>
@@ -303,17 +303,17 @@ C++11 mode.</p>
<tr>
<td>Atomic operations</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html">N2427</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Strong Compare and Exchange</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2748.html">N2748</a></td>
- <td class="none" align="center">No</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Bidirectional Fences</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm">N2752</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
@@ -339,7 +339,7 @@ C++11 mode.</p>
<tr>
<td>Allow atomics use in signal handlers</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm">N2547</a></td>
- <td class="svn" align="center">SVN</td>
+ <td class="full" align="center">Clang 3.1</td>
</tr>
<tr>
<td>Thread-local storage</td>
diff --git a/www/diagnostics.html b/www/diagnostics.html
index 45f6907..84c6f8b 100644
--- a/www/diagnostics.html
+++ b/www/diagnostics.html
@@ -263,6 +263,39 @@ diagnostic.<p>
<span class="snip">template&lt;&gt; </span>
</pre>
+<h2>Template Type Diffing</h2>
+
+<p>Templates types can be long and difficult to read. Moreso when part of an
+error message. Instead of just printing out the type name, Clang has enough
+information to remove the common elements and highlight the differences. To
+show the template structure more clearly, the templated type can also be
+printed as an indented text tree.</p>
+
+Default: template diff with type elision
+<pre>
+t.cc:4:5: <span class="note">note:</span> candidate function not viable: no known conversion from 'vector&lt;map&lt;[...], <span class="template-highlight">float</span>&gt;&gt;' to 'vector&lt;map&lt;[...], <span class="template-highlight">double</span>&gt;&gt;' for 1st argument;
+</pre>
+-fno-elide-type: template diff without elision
+<pre>
+t.cc:4:5: <span class="note">note:</span> candidate function not viable: no known conversion from 'vector&lt;map&lt;int, <span class="template-highlight">float</span>&gt;&gt;' to 'vector&lt;map&lt;int, <span class="template-highlight">double</span>&gt;&gt;' for 1st argument;
+</pre>
+-fdiagnostics-show-template-tree: template tree printing with elision
+<pre>
+t.cc:4:5: <span class="note">note:</span> candidate function not viable: no known conversion for 1st argument;
+ vector&lt;
+ map&lt;
+ [...],
+ [<span class="template-highlight">float</span> != <span class="template-highlight">double</span>]&gt;&gt;
+</pre>
+-fdiagnostics-show-template-tree -fno-elide-type: template tree printing with no elision
+<pre>
+t.cc:4:5: <span class="note">note:M</span> candidate function not viable: no known conversion for 1st argument;
+ vector&lt;
+ map&lt;
+ int,
+ [<span class="template-highlight">float</span> != <span class="template-highlight">double</span>]&gt;&gt;
+</pre>
+
<h2>Automatic Macro Expansion</h2>
<p>Many errors happen in macros that are sometimes deeply nested. With
diff --git a/www/features.html b/www/features.html
index d55391a..2d3191e 100644
--- a/www/features.html
+++ b/www/features.html
@@ -329,13 +329,15 @@ specifically designed and built to capture this information.
<!--=======================================================================-->
<p>We actively intend for clang (and LLVM as a whole) to be used for
-commercial projects, and the BSD license is the simplest way to allow this. We
-feel that the license encourages contributors to pick up the source and work
-with it, and believe that those individuals and organizations will contribute
-back their work if they do not want to have to maintain a fork forever (which is
-time consuming and expensive when merges are involved). Further, nobody makes
-money on compilers these days, but many people need them to get bigger goals
-accomplished: it makes sense for everyone to work together.</p>
+commercial projects, not only as a stand-alone compiler but also as a library
+embedded inside a proprietary application. The BSD license is the simplest way
+to allow this. We feel that the license encourages contributors to pick up the
+source and work with it, and believe that those individuals and organizations
+will contribute back their work if they do not want to have to maintain a fork
+forever (which is time consuming and expensive when merges are involved).
+Further, nobody makes money on compilers these days, but many people need them
+to get bigger goals accomplished: it makes sense for everyone to work
+together.</p>
<p>For more information about the LLVM/clang license, please see the <a
href="http://llvm.org/docs/DeveloperPolicy.html#license">LLVM License
diff --git a/www/get_started.html b/www/get_started.html
index d819532..7756f9e 100644
--- a/www/get_started.html
+++ b/www/get_started.html
@@ -53,21 +53,29 @@ follows:</p>
</li>
<li>Checkout Clang:
<ul>
- <li><tt>cd llvm/tools</tt>
+ <li><tt>cd llvm/tools</tt></li>
<li><tt>svn co http://llvm.org/svn/llvm-project/cfe/trunk clang</tt></li>
+ <li><tt>cd ../..</tt></li>
+ </ul>
+ </li>
+ <li>Checkout extra Clang Tools: (optional)
+ <ul>
+ <li><tt>cd llvm/tools/clang/tools</tt></li>
+ <li><tt>svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk
+ extra</tt></li>
+ <li><tt>cd ../../../..</tt></li>
</ul>
</li>
<li>Checkout Compiler-RT:
<ul>
- <li><tt>cd ../..</tt> (back to where you started)</li>
- <li><tt>cd llvm/projects</tt>
+ <li><tt>cd llvm/projects</tt></li>
<li><tt>svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk
compiler-rt</tt></li>
+ <li><tt>cd ../..</tt></li>
</ul>
</li>
<li>Build LLVM and Clang:
<ul>
- <li><tt>cd ../..</tt> (back to where you started)</li>
<li><tt>mkdir build</tt> (for building without polluting the source dir)
</li>
<li><tt>cd build</tt></li>
@@ -83,15 +91,12 @@ follows:</p>
</li>
<li>If you intend to work on Clang C++ support, you may need to tell it how
- to find your C++ standard library headers. If Clang cannot find your
- system libstdc++ headers, please follow these instructions:
- <ul>
- <li>'<tt>gcc -v -x c++ /dev/null -fsyntax-only</tt>' to get the
- path.</li>
- <li>Look for the comment "FIXME: temporary hack:
- hard-coded paths" in <tt>clang/lib/Frontend/InitHeaderSearch.cpp</tt> and
- change the lines below to include that path.</li>
- </ul>
+ to find your C++ standard library headers. In general, Clang will detect
+ the best version of libstdc++ headers available and use them - it will
+ look both for system installations of libstdc++ as well as installations
+ adjacent to Clang itself. If your configuration fits neither of these
+ scenarios, you can use the <tt>--with-gcc-toolchain</tt> configure option
+ to tell Clang where the gcc containing the desired libstdc++ is installed.
</li>
<li>Try it out (assuming you add llvm/Debug+Asserts/bin to your path):
<ul>
@@ -267,7 +272,7 @@ $ <b>clang -fsyntax-only ~/t.c -pedantic</b>
<h3>Pretty printing from the AST:</h3>
-<p>Note, the <tt>-cc1</tt> argument indicates the the compiler front-end, and
+<p>Note, the <tt>-cc1</tt> argument indicates the compiler front-end, and
not the driver, should be run. The compiler front-end has several additional
Clang specific features which are not exposed through the GCC compatible driver
interface.</p>
diff --git a/www/menu.html.incl b/www/menu.html.incl
index 878e678..2c00d0f 100644
--- a/www/menu.html.incl
+++ b/www/menu.html.incl
@@ -28,6 +28,7 @@
<div class="submenu">
<label>Clang Tools</label>
<a href="http://clang-analyzer.llvm.org">Automatic Bug-Finding</a>
+ <a href="/docs/Tooling.html">Writing Clang Tools</a>
</div>
<div class="submenu">
OpenPOWER on IntegriCloud