aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
commit809500fc2c13c8173a16b052304d983864e4a1e1 (patch)
tree4fc2f184c499d106f29a386c452b49e5197bf63d /www
parentbe7c9ec198dcdb5bf73a35bfbb00b3333cb87909 (diff)
downloadsrc-809500fc2c13c8173a16b052304d983864e4a1e1.tar.gz
src-809500fc2c13c8173a16b052304d983864e4a1e1.zip
Vendor import of clang trunk r178860:vendor/clang/clang-trunk-r178860
Notes
Notes: svn path=/vendor/clang/dist/; revision=249261 svn path=/vendor/clang/clang-trunk-r178860/; revision=249262; tag=vendor/clang/clang-trunk-r178860
Diffstat (limited to 'www')
-rw-r--r--www/OpenProjects.html32
-rw-r--r--www/analyzer/annotations.html72
-rw-r--r--www/analyzer/available_checks.html3
-rw-r--r--www/analyzer/checker_dev_manual.html38
-rw-r--r--www/analyzer/content.css1
-rw-r--r--www/analyzer/dev_cxx.html37
-rw-r--r--www/analyzer/faq.html16
-rw-r--r--www/analyzer/index.html29
-rw-r--r--www/analyzer/latest_checker.html.incl2
-rw-r--r--www/analyzer/potential_checkers.html183
-rw-r--r--www/analyzer/release_notes.html41
-rw-r--r--www/analyzer/xcode.html44
-rw-r--r--www/comparison.html1
-rw-r--r--www/compatibility.html101
-rw-r--r--www/cxx_status.html40
-rw-r--r--www/get_started.html14
-rw-r--r--www/hacking.html4
-rw-r--r--www/menu.html.incl2
-rw-r--r--www/performance-2008-10-31.html132
-rw-r--r--www/performance-2009-03-02.html110
-rw-r--r--www/performance.html104
21 files changed, 398 insertions, 608 deletions
diff --git a/www/OpenProjects.html b/www/OpenProjects.html
index b2d4dae6c3e0..98d86602fb4d 100644
--- a/www/OpenProjects.html
+++ b/www/OpenProjects.html
@@ -82,13 +82,7 @@ improve the quality of clang by self-testing. Some examples:
C++'98 is feature complete, but there is still a lot of C++'11 features to
implement. Please see the <a href="cxx_status.html">C++ status report
page</a> to find out what is missing.</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>
-<ul>
<li><b>StringRef'ize APIs</b>: A thankless but incredibly useful project is
StringRef'izing (converting to use <tt>llvm::StringRef</tt> instead of <tt>const
char *</tt> or <tt>std::string</tt>) various clang interfaces. This generally
@@ -107,8 +101,34 @@ Driver</a> web page for more information.</li>
<li><i>Documented</i>, with appropriate Schema against which the output of Clang's XML formatter can be verified.</li>
<li><i>Stable</i> across Clang versions.</li>
</ul></li>
+
+<li><b>Configuration Manager</b>: Clang/LLVM works on a large number of
+architectures and operating systems and can cross-compile to a similarly large
+number of configurations, but the pitfalls of chosing the command-line
+options, making sure the right sub-architecture is chosen and that the correct
+optional elements of your particular system can be a pain.
+
+<p>A tool that would investigate hosts and targets, and store the configuration
+in files that can later be used by Clang itself to avoid command-line options,
+especially the ones regarding which target options to use, would greatle alleviate
+this problem. A simple tool, with little or no dependency on LLVM itself, that
+will investigate a target architecture by probing hardware, software, libraries
+and compiling and executing code to identify all properties that would be relevant
+to command-line options (VFP, SSE, NEON, ARM vs. Thumb etc), triple settings etc.</p>
+
+<p>The first stage is to build a CFLAGS for Clang that would produce code on the
+current Host to the identified Target.</p>
+
+<p>The second stage would be to produce a configuration file (that can be used
+independently of the Host) so that Clang can read it and not need a gazillion
+of command-line options. Such file should be simple JSON / INI or anything that
+a text editor could change.</p>
</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>
diff --git a/www/analyzer/annotations.html b/www/analyzer/annotations.html
index bb4bc448c7f4..ca6a185c1d9b 100644
--- a/www/analyzer/annotations.html
+++ b/www/analyzer/annotations.html
@@ -127,7 +127,10 @@ conventions can cause the analyzer to miss bugs or flag false positives.</p>
<p>One can educate the analyzer (and others who read your code) about methods or
functions that deviate from the Cocoa and Core Foundation conventions using the
-attributes described here.</p>
+attributes described here. However, you should consider using proper naming
+conventions or the <a
+href="http://clang.llvm.org/docs/LanguageExtensions.html#the-objc-method-family-attribute"><tt>objc_method_family</tt></a>
+attribute, if applicable.</p>
<h4 id="attr_ns_returns_retained">Attribute 'ns_returns_retained'
(Clang-specific)</h4>
@@ -135,7 +138,9 @@ attributes described here.</p>
<p>The GCC-style (Clang-specific) attribute 'ns_returns_retained' allows one to
annotate an Objective-C method or C function as returning a retained Cocoa
object that the caller is responsible for releasing (via sending a
-<tt>release</tt> message to the object).</p>
+<tt>release</tt> message to the object). The Foundation framework defines a
+macro <b><tt>NS_RETURNS_RETAINED</tt></b> that is functionally equivalent to the
+one shown below.</p>
<p><b>Placing on Objective-C methods</b>: For Objective-C methods, this
annotation essentially tells the analyzer to treat the method as if its name
@@ -202,7 +207,9 @@ href="#attr_ns_returns_retained">ns_returns_retained</a>'. Where a function or
method may appear to obey the Cocoa conventions and return a retained Cocoa
object, this attribute can be used to indicate that the object reference
returned should not be considered as an &quot;owning&quot; reference being
-returned to the caller.</p>
+returned to the caller. The Foundation framework defines a
+macro <b><tt>NS_RETURNS_NOT_RETAINED</tt></b> that is functionally equivalent to
+the one shown below.</p>
<p>Usage is identical to <a
href="#attr_ns_returns_retained">ns_returns_retained</a>. When using the
@@ -229,7 +236,9 @@ its availability, as it is not available in earlier versions of the analyzer:</p
<p>The GCC-style (Clang-specific) attribute 'cf_returns_retained' allows one to
annotate an Objective-C method or C function as returning a retained Core
-Foundation object that the caller is responsible for releasing.
+Foundation object that the caller is responsible for releasing. The
+CoreFoundation framework defines a macro <b><tt>CF_RETURNS_RETAINED</tt></b>
+that is functionally equivalent to the one shown below.</p>
<p><b>Placing on Objective-C methods</b>: With respect to Objective-C methods.,
this attribute is identical in its behavior and usage to 'ns_returns_retained'
@@ -330,7 +339,9 @@ href="#attr_cf_returns_retained">cf_returns_retained</a>'. Where a function or
method may appear to obey the Core Foundation or Cocoa conventions and return
a retained Core Foundation object, this attribute can be used to indicate that
the object reference returned should not be considered as an
-&quot;owning&quot; reference being returned to the caller.</p>
+&quot;owning&quot; reference being returned to the caller. The
+CoreFoundation framework defines a macro <b><tt>CF_RETURNS_NOT_RETAINED</tt></b>
+that is functionally equivalent to the one shown below.</p>
<p>Usage is identical to <a
href="#attr_cf_returns_retained">cf_returns_retained</a>. When using the
@@ -355,9 +366,12 @@ its availability, as it is not available in earlier versions of the analyzer:</p
<h4 id="attr_ns_consumed">Attribute 'ns_consumed'
(Clang-specific)</h4>
-<p>The 'ns_consumed' attribute can be placed on a specific parameter in either the declaration of a function or an Objective-C method.
- It indicates to the static analyzer that a <tt>release</tt> message is implicitly sent to the parameter upon
- completion of the call to the given function or method.
+<p>The 'ns_consumed' attribute can be placed on a specific parameter in either
+the declaration of a function or an Objective-C method. It indicates to the
+static analyzer that a <tt>release</tt> message is implicitly sent to the
+parameter upon completion of the call to the given function or method. The
+Foundation framework defines a macro <b><tt>NS_RELEASES_ARGUMENT</tt></b> that
+is functionally equivalent to the <tt>NS_CONSUMED</tt> macro shown below.</p>
<p><b>Important note when using Garbage Collection</b>: Note that the analyzer
essentially ignores this attribute when code is compiled to use Objective-C
@@ -409,14 +423,19 @@ void test_method2() {
<h4 id="attr_cf_consumed">Attribute 'cf_consumed'
(Clang-specific)</h4>
-<p>The 'cf_consumed' attribute is practically identical to <a href="#attr_ns_consumed">ns_consumed</a>.
-The attribute can be placed on a specific parameter in either the declaration of a function or an Objective-C method.
-It indicates to the static analyzer that the object reference is implicitly passed to a call to <tt>CFRelease</tt> upon
-completion of the call to the given function or method.</p>
+<p>The 'cf_consumed' attribute is practically identical to <a
+href="#attr_ns_consumed">ns_consumed</a>. The attribute can be placed on a
+specific parameter in either the declaration of a function or an Objective-C
+method. It indicates to the static analyzer that the object reference is
+implicitly passed to a call to <tt>CFRelease</tt> upon completion of the call
+to the given function or method. The CoreFoundation framework defines a macro
+<b><tt>CF_RELEASES_ARGUMENT</tt></b> that is functionally equivalent to the
+<tt>CF_CONSUMED</tt> macro shown below.</p>
-<p>Operationally this attribute is nearly identical to ns_consumed
-with the main difference that the reference count decrement still occurs when using Objective-C garbage
-collection (which is import for Core Foundation types, which are not automatically garbage collected).</p>
+<p>Operationally this attribute is nearly identical to 'ns_consumed' with the
+main difference that the reference count decrement still occurs when using
+Objective-C garbage collection (which is import for Core Foundation types,
+which are not automatically garbage collected).</p>
<p><b>Example</b></p>
@@ -461,13 +480,13 @@ void test_method() {
<h4 id="attr_ns_consumes_self">Attribute 'ns_consumes_self'
(Clang-specific)</h4>
-<p>The 'ns_consumes_self' attribute can be placed only on an Objective-C method declaration.
- It indicates that the receiver of the message is &quot;consumed&quot; (a single reference count decremented)
- after the message is sent. This matches the semantics of all &quot;init&quot; methods.
-</p>
+<p>The 'ns_consumes_self' attribute can be placed only on an Objective-C method
+declaration. It indicates that the receiver of the message is
+&quot;consumed&quot; (a single reference count decremented) after the message
+is sent. This matches the semantics of all &quot;init&quot; methods.</p>
-<p>One use of this attribute is declare your own init-like methods that do not follow the
- standard Cocoa naming conventions.</p>
+<p>One use of this attribute is declare your own init-like methods that do not
+follow the standard Cocoa naming conventions.</p>
<p><b>Example</b></p>
@@ -490,8 +509,15 @@ void test_method() {
@end
</pre>
-<p>In this example, <tt>nonstandardInitWith:</tt> has the same ownership semantics as the init method <tt>initWith:</tt>.
- The static analyzer will observe that the method consumes the receiver, and then returns an object with a +1 retain count.</p>
+<p>In this example, <tt>-nonstandardInitWith:</tt> has the same ownership
+semantics as the init method <tt>-initWith:</tt>. The static analyzer will
+observe that the method consumes the receiver, and then returns an object with
+a +1 retain count.</p>
+
+<p>The Foundation framework defines a macro <b><tt>NS_REPLACES_RECEIVER</tt></b>
+which is functionally equivalent to the combination of <tt>NS_CONSUMES_SELF</tt>
+and <tt>NS_RETURNS_RETAINED</tt> shown above.</p>
+
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<h2 id="custom_assertions">Custom Assertion Handlers</h2>
diff --git a/www/analyzer/available_checks.html b/www/analyzer/available_checks.html
index 4f8971c5507f..be15125a7e89 100644
--- a/www/analyzer/available_checks.html
+++ b/www/analyzer/available_checks.html
@@ -176,14 +176,13 @@
<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>
+<p>In addition to these the analyzer contains numerous experimental (alpha) checkers.</p>
<h3>Writeups with examples of some of the bugs that the analyzer finds</h3>
<ul>
<li><a href="http://www.mobileorchard.com/bug-finding-with-clang-5-resources-to-get-you-started/">Bug Finding With Clang: 5 Resources To Get You Started</a></li>
<li><a href="http://fruitstandsoftware.com/blog/index.php/2008/08/finding-memory-leaks-with-the-llvmclang-static-analyzer/#comment-2">Finding Memory Leaks With The LLVM/Clang Static Analyzer</a></li>
-<li><a href="http://www.therareair.com/howto-static-analyze-your-objective-c-code-using-the-clang-static-analyzer-tool-gallery/">HOWTO: Static Analyze Your Objective-C Code Using the Clang Static Analyzer Tool Gallery</a></li>
<li><a href="http://www.rogueamoeba.com/utm/2008/07/14/the-clang-static-analyzer/">Under the Microscope - The Clang Static Analyzer</a></li>
<li><a href="http://www.mikeash.com/?page=pyblog/friday-qa-2009-03-06-using-the-clang-static-analyzer.html">Mike Ash - Using the Clang Static Analyzer</a></li>
</ul>
diff --git a/www/analyzer/checker_dev_manual.html b/www/analyzer/checker_dev_manual.html
index 043b53612aea..5368eb0e9618 100644
--- a/www/analyzer/checker_dev_manual.html
+++ b/www/analyzer/checker_dev_manual.html
@@ -116,28 +116,44 @@ for general developer guidelines and information. </p>
<h3>Representing Values</h3>
During symbolic execution, <a href="http://clang.llvm.org/doxygen/classclang_1_1ento_1_1SVal.html">SVal</a>
- objects are used to represent the semantic evaluation of expressions. They can
- represent things like concrete integers, symbolic values, or memory locations
- (which are memory regions). They are a discriminated union of "values",
- symbolic and otherwise.
+ objects are used to represent the semantic evaluation of expressions.
+ They can represent things like concrete
+ integers, symbolic values, or memory locations (which are memory regions).
+ They are a discriminated union of "values", symbolic and otherwise.
+ If a value isn't symbolic, usually that means there is no symbolic
+ information to track. For example, if the value was an integer, such as
+ <tt>42</tt>, it would be a <a href="http://clang.llvm.org/doxygen/classclang_1_1ento_1_1nonloc_1_1ConcreteInt.html">ConcreteInt</a>,
+ and the checker doesn't usually need to track any state with the concrete
+ number. In some cases, <tt>SVal</tt> is not a symbol, but it really should be
+ a symbolic value. This happens when the analyzer cannot reason about something
+ (yet). An example is floating point numbers. In such cases, the
+ <tt>SVal</tt> will evaluate to <a href="http://clang.llvm.org/doxygen/classclang_1_1ento_1_1UnknownVal.html">UnknownVal<a>.
+ This represents a case that is outside the realm of the analyzer's reasoning
+ capabilities. <tt>SVals</tt> are value objects and their values can be viewed
+ using the <tt>.dump()</tt> method. Often they wrap persistent objects such as
+ symbols or regions.
<p>
<a href="http://clang.llvm.org/doxygen/classclang_1_1ento_1_1SymExpr.html">SymExpr</a> (symbol)
- is meant to represent abstract, but named, symbolic value.
- Symbolic values can have constraints associated with them. Symbols represent
+ is meant to represent abstract, but named, symbolic value. Symbols represent
an actual (immutable) value. We might not know what its specific value is, but
- we can associate constraints with that value as we analyze a path.
+ we can associate constraints with that value as we analyze a path. For
+ example, we might record that the value of a symbol is greater than
+ <tt>0</tt>, etc.
+ <p>
+
<p>
-
<a href="http://clang.llvm.org/doxygen/classclang_1_1ento_1_1MemRegion.html">MemRegion</a> is similar to a symbol.
It is used to provide a lexicon of how to describe abstract memory. Regions can
layer on top of other regions, providing a layered approach to representing memory.
For example, a struct object on the stack might be represented by a <tt>VarRegion</tt>,
but a <tt>FieldRegion</tt> which is a subregion of the <tt>VarRegion</tt> could
be used to represent the memory associated with a specific field of that object.
- So how do we represent symbolic memory regions? That's what <a href="http://clang.llvm.org/doxygen/classclang_1_1ento_1_1SymbolicRegion.html">SymbolicRegion</a>
- is for. It is a <tt>MemRegion</tt> that has an associated symbol. Since the
+ So how do we represent symbolic memory regions? That's what
+ <a href="http://clang.llvm.org/doxygen/classclang_1_1ento_1_1SymbolicRegion.html">SymbolicRegion</a>
+ is for. It is a <tt>MemRegion</tt> that has an associated symbol. Since the
symbol is unique and has a unique name; that symbol names the region.
- <p>
+
+ <P>
Let's see how the analyzer processes the expressions in the following example:
<p>
<pre class="code_example">
diff --git a/www/analyzer/content.css b/www/analyzer/content.css
index c2fa294d795f..6f68fdb7d527 100644
--- a/www/analyzer/content.css
+++ b/www/analyzer/content.css
@@ -87,6 +87,7 @@ table.checkers td {
border-bottom: 1px #cccccc dotted;
}
+table.checkers td.aligned { text-align: center; vertical-align: middle; }
table.checkers col.namedescr { width: 45% }
table.checkers col.example { width: 55% }
table.checkers col.progress { width: 84px }
diff --git a/www/analyzer/dev_cxx.html b/www/analyzer/dev_cxx.html
index 39dbf7b4af8f..4424a9a8b5be 100644
--- a/www/analyzer/dev_cxx.html
+++ b/www/analyzer/dev_cxx.html
@@ -15,16 +15,13 @@
<h1>C++ Support</h1>
-<p>The Clang frontend
-now <a href="http://clang.llvm.org/cxx_status.html">supports the
-majority of C++</a>. Support in the frontend for C++ language
-features, however, does not automatically translate into support for
-those features in the static analyzer. Language features need to be
-specifically modeled in the static analyzer so their semantics can be
-properly analyzed. Support for analyzing C++ and Objective-C++ files
-is currently extremely limited, and we are only encouraging those who
-are interested in contributing to the development of the analyzer to
-try this functionality out at this time.</p>
+<p>The Clang compiler <a
+href="http://clang.llvm.org/cxx_status.html">supports almost all of C++11</a>.
+Support in the frontend for C++ language features, however, does not
+automatically translate into support for those features in the static analyzer.
+Language features need to be specifically modeled in the static analyzer so
+their semantics can be properly analyzed. Support for analyzing C++ and
+Objective-C++ files is currently fairly basic.</p>
<p>Listed here are a set of open tasks that are prerequisites for
decent analysis of C++. This list is also not complete; new tasks
@@ -33,16 +30,22 @@ will be added as deemed necessary.</p>
<ul>
<li>Control-Flow Graph Enhancements:
<ul>
- <li>Model C++ destructors</li>
- <li>Model C++ initializers (in constructors)</li>
+ <li>Model destructors for temporary objects</li>
+ <li>Model the implicit allocator call to <tt>operator new</tt></li>
</ul>
</li>
- <li>Path-Sensitive Analysis Engine (GRExprEngine):
+ <li>Path-Sensitive Analysis Engine (ExprEngine):
<ul>
- <li>Model C++ casts</li>
- <li>Model C++ constructors</li>
- <li>Model C++ destructors</li>
- <li>Model <tt>new</tt> and <tt>delete</tt></li>
+ <li>Allow constructors to be inlined</li>
+ <li>Allow destructors to be inlined</li>
+ <li>Fully model <tt>new</tt> and <tt>delete</tt></li>
+ <li>Track type info through casts more precisely</li>
+ </ul>
+ </li>
+ <li>Checkers:
+ <ul>
+ <li>Check that <tt>new</tt> and <tt>delete</tt> are correctly paired</li>
+ <li>For more ideas, see the <a href="potential_checkers.html">list of potential checkers</a></li>
</ul>
</li>
</ul>
diff --git a/www/analyzer/faq.html b/www/analyzer/faq.html
index 5c132b57f2e5..129bfb63bb1b 100644
--- a/www/analyzer/faq.html
+++ b/www/analyzer/faq.html
@@ -68,13 +68,15 @@ int foo(int *b) {
<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>
+<p> In the contrived example above, the analyzer has detected that the body of
+the loop is never entered for the case where <tt>length <= 0</tt>. In this
+particular example, you may know that the loop will always be entered because
+the input parameter <tt>length</tt> will be greater than zero in all calls to this
+function. You can teach the analyzer facts about your code as well as document
+it by using assertions. By adding <tt>assert(length > 0)</tt> in the beginning
+of the function, you tell the analyzer that your code is never expecting a zero
+or a negative value, so it won't need to test the correctness of those paths.
+</p>
<pre class="code_example">
int foo(int length) {
diff --git a/www/analyzer/index.html b/www/analyzer/index.html
index 18bafd056288..33e858179df5 100644
--- a/www/analyzer/index.html
+++ b/www/analyzer/index.html
@@ -69,12 +69,12 @@
<h1>Clang Static Analyzer</h1>
-<p>The Clang Static Analyzer is source code analysis tool that find bugs in C
-and Objective-C programs.</p>
+<p>The Clang Static Analyzer is a source code analysis tool that finds bugs in
+C, C++, and Objective-C programs.</p>
-<p>Currently it can be run either as a <a href="/scan-build.html">standalone
-tool</a> or <a href="/xcode.html">within Xcode</a>. The standalone tool is
-invoked from the command-line, and is intended to be run in tandem with a build
+<p>Currently it can be run either as a <a href="scan-build.html">standalone
+tool</a> or <a href="xcode.html">within Xcode</a>. The standalone tool is
+invoked from the command line, and is intended to be run in tandem with a build
of a codebase.</p>
<p>The analyzer is 100% open source and is part of the <a
@@ -138,14 +138,14 @@ applications.</p>
</td><td style="padding-left:10px">
<a href="images/analyzer_xcode.png"><img src="images/analyzer_xcode.png" width="450" alt="analyzer in xcode"></a>
-<div style="text-align:center"><b>Viewing static analyzer results in Xcode 3.2</b></div>
+<div style="text-align:center"><b>Viewing static analyzer results in Xcode</b></div>
<a href="images/analyzer_html.png"><img src="images/analyzer_html.png" width="450" alt="analyzer in browser"></a>
<div style="text-align:center"><b>Viewing static analyzer results in a web browser</b></div>
</td></tr></table>
<h2 id="StaticAnalysis">What is Static Analysis?</h2>
-<p>The term &quot;static analysis&quot; is conflated, but here we use it to mean
+<p>The term "static analysis" is conflated, but here we use it to mean
a collection of algorithms and techniques used to analyze source code in order
to automatically find bugs. The idea is similar in spirit to compiler warnings
(which can be useful for finding coding errors) but to take that idea a step
@@ -155,9 +155,8 @@ techniques such as testing.</p>
<p>Static analysis bug-finding tools have evolved over the last several decades
from basic syntactic checkers to those that find deep bugs by reasoning about
the semantics of code. The goal of the Clang Static Analyzer is to provide a
-industrial-quality static analysis framework for analyzing C and Objective-C
-programs that is freely available, extensible, and has a high quality of
-implementation.</p>
+industrial-quality static analysis framework for analyzing C, C++, and
+Objective-C programs that is freely available, extensible, and has a high quality of implementation.</p>
<h3 id="Clang">Part of Clang and LLVM</h3>
@@ -175,11 +174,11 @@ bugs, we ask you to bear in mind a few points when using it.</p>
<h3>Work-in-Progress</h3>
-<p>The analyzer is a continuous work-in-progress.
-There are many planned enhancements to improve both the precision and scope of
-its analysis algorithms as well as the kinds bugs it will find. While there are
-fundamental limitations to what static analysis can do, we have a long way to go
-before hitting that wall.</p>
+<p>The analyzer is a continuous work-in-progress. There are many planned
+enhancements to improve both the precision and scope of its analysis algorithms
+as well as the kinds of bugs it will find. While there are fundamental
+limitations to what static analysis can do, we have a long way to go before
+hitting that wall.</p>
<h3>Slower than Compilation</h3>
diff --git a/www/analyzer/latest_checker.html.incl b/www/analyzer/latest_checker.html.incl
index 996bc34cc139..1355297e7c4f 100644
--- a/www/analyzer/latest_checker.html.incl
+++ b/www/analyzer/latest_checker.html.incl
@@ -1 +1 @@
-<b><a href="http://bit.ly/USf8ge">checker-269.tar.bz2</a></b> (built September 25, 2012)
+<b><a href="https://attache.apple.com/AttacheWeb/dl?id=ATCbb91eedf8edf4c7388549be8f91e810d">checker-272.tar.bz2</a></b> (built March 1, 2013)
diff --git a/www/analyzer/potential_checkers.html b/www/analyzer/potential_checkers.html
index f65106efaf92..04bf9fe45d09 100644
--- a/www/analyzer/potential_checkers.html
+++ b/www/analyzer/potential_checkers.html
@@ -43,7 +43,8 @@ void test() {
return;
delete p2;
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"><a href="http://llvm.org/bugs/show_bug.cgi?id=15237">PR15237</a>
+</td></tr>
<tr><td><span class="name">memory.MismatchedFree
<br>enhancement to unix.Malloc<br>(C, C++)</span><br><br>
@@ -58,7 +59,8 @@ void test() {
free(p1); // warn
free(p2); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"><a href="http://llvm.org/bugs/show_bug.cgi?id=15238">PR15238</a>
+</td></tr>
<tr><td><span class="name">memory.MismatchedDelete
<br>(C, C++)</span><br><br>
@@ -75,7 +77,8 @@ void test() {
delete p2; // warn
delete p3; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"><a href="http://llvm.org/bugs/show_bug.cgi?id=15238">PR15238</a>
+</td></tr>
<tr><td><span class="name">memory.MultipleDelete
<br>(C++)</span><br><br>
@@ -92,7 +95,9 @@ void test() {
delete p2; // warn
delete p3; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"><a href="http://llvm.org/bugs/show_bug.cgi?id=15237">PR15237</a>
+</td></tr>
+
<tr><td><span class="name">memory.LeakPtrValChanged
<br>enhancement to unix.Malloc<br>(C, C++)</span><br><br>
@@ -116,7 +121,9 @@ void test() {
f(p4);
p4++; // ok
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned">done at r174678 (C case)
+</td></tr>
+
<tr><td><span class="name">memory.DeallocateNonPtr
<br>enhancement to unix.Malloc<br>(C, C++)</span><br><br>
@@ -138,7 +145,9 @@ void test() {
delete s; // warn
free(s); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"><a href="http://llvm.org/bugs/show_bug.cgi?id=15237">PR15237</a>
+</td></tr>
+
<tr><td><span class="name">memory.LeakEvalOrder<br>
(C, C++)</span><br><br>
@@ -156,7 +165,7 @@ void test() {
f1(g((int *)malloc(sizeof(int))), h()); // warn
f2(new int, new int);
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">memory.DstBufferTooSmall
<br>(C, C++)</span><br><br>
@@ -173,7 +182,7 @@ void test() {
int* p2 = new int;
memcpy(p2, p1, 3); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">memory.NegativeArraySize
<br>enhancement to experimental.security.MallocOverflow<br>(C, C++)
@@ -187,7 +196,7 @@ void test() {
int n1 = -1;
p = new int[n1]; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
</table>
@@ -208,7 +217,7 @@ class A {
A() {}
~A() { throw 1; } // warn
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">ctordtor.ExptInsideDtorImplicit<br>
(C++)</span><br><br>
@@ -221,7 +230,7 @@ class A {
A() {}
~A() { f(); } // warn
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
</table>
@@ -237,7 +246,7 @@ Function prototype has throw(T) specifier but the function do not throw
</td><td><pre>
void f() throw(int) { // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">exceptions.NoThrowSpecButThrows
<br>(C++)</span><br><br>
@@ -246,7 +255,7 @@ An exception is throw from a function having the throw() specifier
void f() throw() {
throw(1); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">exceptions.ThrownTypeDiffersSpec
<br>(C++)</span><br><br>
@@ -258,7 +267,7 @@ void f() throw(int) {
S s;
throw (s); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
</table>
@@ -286,7 +295,7 @@ void test() {
std::auto_ptr&lt;int&gt;
p3((int *)malloc(sizeof(int))); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
</table>
@@ -311,7 +320,7 @@ public:
};
A a;
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.LocalStaticDestroyed
<br>(C++)</span><br><br>
@@ -336,7 +345,7 @@ A a;
void f() {
static B b; // &lt;-
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.UseAfterRelease
<br>enhancement to unix.Malloc<br>(C, C++)</span><br><br>
@@ -351,7 +360,7 @@ void test() {
int i = *p; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ZeroAllocDereference
<br>enhancement to unix.Malloc<br>(C, C++)</span><br><br>
@@ -362,7 +371,7 @@ undefined
int *p = new int[0];
int i = p[0]; // warn
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.DeadReferenced
<br>(C++)</span><br><br>
@@ -418,7 +427,7 @@ void test() {
dynamic_cast&lt;A*&gt;(b); // warn
delete b; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ObjLocChanges
<br>(C++)</span><br><br>
@@ -439,7 +448,7 @@ void test() {
new (&amp;b2) T;
delete b1; // warn
} // warn
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ExprEvalOrderUndef
<br>(C, C++03)</span><br><br>
@@ -452,7 +461,7 @@ void test () {
i = v[i++]; // warn
i = ++i + 1; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.StaticInitReentered
<br>(C)</span><br><br>
@@ -463,7 +472,7 @@ int test(int i) {
static int s = test(2*i); // warn
return i+1;
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ConstModified
<br>(C, C++)</span><br><br>
@@ -493,7 +502,7 @@ void test() {
p-&gt;x.i = 1; // ok
p-&gt;x.j = 1; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.DeadDestructed
<br>(C++)</span><br><br>
@@ -511,7 +520,7 @@ void test() {
A a;
a.~A();
} // warn
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.MethodCallBeforeBaseInit
<br>(C++)</span><br><br>
@@ -526,7 +535,7 @@ public :
int f();
B() : A(f()) {} // warn
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.MemberOrBaseRefBeforeCtor
<br>(C++)</span><br><br>
@@ -589,7 +598,7 @@ struct S {
non_trivial nt;
S() : k(&amp;nt.j) {} // warn
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.MemberRefAfterDtor
<br>(C++)</span><br><br>
@@ -620,7 +629,7 @@ void test() {
s->~S();
s->f(); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.CtorForeignCall
<br>(C++)</span><br><br>
@@ -641,7 +650,7 @@ class C : public A, B {
public:
C() : B((A*)this) {}
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.CtorForeignCast
undefbehavior.CtorForeignTypeid
@@ -669,7 +678,7 @@ class C : public A, B {
public:
C() : B((A*)this) {}
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.MemberRefInCatch
undefbehavior.BaseRefInCatch
@@ -689,7 +698,7 @@ public :
i=2; // warn
}
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ReturnAtCatchEnd
<br>(C++)</span><br><br>
@@ -701,7 +710,7 @@ int test() try {
}
catch(int) {
} // warn
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.AutoptrsOwnSameObj
<br>(C++03)</span><br><br>
@@ -715,7 +724,7 @@ void test() {
std::auto_ptr&lt;int&gt; p(data);
std::auto_ptr&lt;int&gt; q(data); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.BasicStringBoundAccess
<br>(C++03)</span><br><br>
@@ -725,7 +734,7 @@ void test() {
std::basic_string&lt;char&gt; s;
char c = s[10]; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.BasicStringBoundModification
<br>(C++)</span><br><br>
@@ -735,7 +744,7 @@ void test() {
std::basic_string&lt;char&gt; s;
s[10] = 0; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.EosDereference
<br>(C++)</span><br><br>
@@ -749,7 +758,7 @@ void test() {
int i = *v.end(); // warn
*v.end() = 0; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.QsortNonPOD
undefbehavior.QsortNonTrivial
@@ -815,7 +824,7 @@ void test() {
qsort(nt, 2, sizeof(non_trivial),
compare2); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ThrowWhileCopy
<br>C++</span><br><br>
@@ -835,7 +844,7 @@ struct S {
j = s.j;
}
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ValarrayArgBound
<br>(C++)</span><br><br>
@@ -853,7 +862,7 @@ void test(void) {
S s[] = { S(1), S(2) };
std::valarray&lt;S&gt; v(s,3); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ValarrayLengthDiffer
<br>(C++)</span><br><br>
@@ -886,7 +895,7 @@ void test(void) {
b.resize(1);
a = b; // OK
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ValarrayZeroLength
<br>(C++)</span><br><br>
@@ -901,7 +910,7 @@ void test(void) {
v.min(); // warn
v.max(); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.ValarrayBadIndirection
<br>(C++)</span><br><br>
@@ -917,7 +926,7 @@ void test() {
a[indirect] = b; //warn
a[indirect] *= b; //warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.IosBaseDestroyedBeforeInit
<br>(C++)</span><br>
@@ -948,7 +957,7 @@ void test() {
delete p1; // warn
delete p2; // ok
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.IosBaseUsedBeforeInit
<br>(C++11)</span><br><br>
@@ -980,7 +989,7 @@ void test() {
delete p1; // warn
delete p2; // ok
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">undefbehavior.MinusOnePosType
<br>(C++)</span><br><br>
@@ -1003,7 +1012,7 @@ void test() {
in.seekg(pos); // warn
out.seekp(-1); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
</table>
<!-- ============================ different ================================ -->
@@ -1024,7 +1033,7 @@ void test() {
int v[1] = {0};
f(v[i], i++); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.IdenticalExprBinOp
<br>(C)</span><br><br>
@@ -1050,7 +1059,7 @@ void test() {
if (f() && f()) {} // ok
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.FuncPtrInsteadOfCall
<br>(C)</span><br><br>
@@ -1061,7 +1070,7 @@ int f();
void test() {
if (f == 0) {} // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.IdenticalCondIfElseIf
<br>(C)</span><br><br>
@@ -1073,7 +1082,7 @@ void test() {
if (i == 1) {}
else if (i == 1) {} // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">SuccessiveAssign
<br>(C)</span><br><br>
@@ -1084,7 +1093,7 @@ void test() {
i=1;
i=2; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.NullDerefStmtOrder
<br>enhancement to core.NullDereference<br>(C)</span><br><br>
@@ -1105,7 +1114,7 @@ void test() {
S *p2 = f();
int x2 = p2-&gt;x; // ok
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.NullDerefCondOrder
<br>enhancement to core.NullDereference<br>(C)</span><br><br>
@@ -1120,7 +1129,7 @@ void test() {
S *p = f();
if (p-&gt;b && p) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.IdenticalStmtThenElse
<br>(C)</span><br><br>
@@ -1135,7 +1144,7 @@ void test() {
i++;
}
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.MultipleAccessors
<br>(C++)</span><br><br>
@@ -1150,7 +1159,7 @@ public:
void setI(int& ii) { i = ii; }
void setJ(int& jj) { i = jj; } // warn
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.AccessorsForPublic
<br>(C++)</span><br><br>
@@ -1162,7 +1171,7 @@ public:
int getI() { return i; }
void setI(int& ii) { i = ii; }
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.LibFuncResultUnised
<br>(C, C++)</span><br><br>
@@ -1175,7 +1184,7 @@ void test() {
std::vector&lt;int&gt; v;
v.empty(); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.WrongVarForStmt
<br>(C, C++)</span><br><br>
@@ -1188,7 +1197,7 @@ void test() {
for (j=0; j&lt;3; ++i); // warn
for (int j=0; i&lt;3; ++j); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.FloatingCompare
<br>(C)</span><br><br>
@@ -1201,7 +1210,7 @@ void test() {
if (b == 0.5) // warn
b = 0;
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.BoolCompare
<br>maybe merge with experimental.core.BoolAssignment<br>(C, C++)</span><br><br>
@@ -1213,7 +1222,7 @@ void test() {
bool b;
if (b == 3) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.BitwiseOpBoolArg
<br>maybe join with experimental.core.BoolAssignment<br>(C, C++)</span><br><br>
@@ -1226,7 +1235,7 @@ void test() {
bool b = true;
if (b &amp; f()) {} // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.LabelInsideSwitch
<br>(C)</span><br><br>
@@ -1242,7 +1251,7 @@ void test() {
c -= 1; break;
}
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.IdenticalCondIfIf
<br>(C)</span><br><br>
@@ -1255,7 +1264,7 @@ void test() {
if (c &gt; 5) // warn
c -= 1;
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.CondOpIdenticalReturn
<br>(C)</span><br><br>
@@ -1265,7 +1274,7 @@ void test() {
unsigned a;
a = a > 5 ? a : a; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.UnaryPlusWithUnsigned
<br>(C)</span><br><br>
@@ -1275,7 +1284,7 @@ void test() {
unsigned a;
a = +a; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.LogicalOpUselessArg
<br>(C)</span><br><br>
@@ -1285,7 +1294,7 @@ void test() {
unsigned a;
if (a&lt;7 &amp;&amp; a&lt;10) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.SameResLogicalExpr
<br>(C)</span><br><br>
@@ -1297,7 +1306,7 @@ void test() {
if (i==0 &amp;&amp; i==1) {}; // warn
if (i<0 || i>=0) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.SameResUnsignedCmp
<br>(C)</span><br><br>
@@ -1308,7 +1317,7 @@ void test() {
if (u &lt; -1) {}; // warn
if (u &gt;= 0) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.OpPrecedenceAssignCmp
<br>(C)</span><br><br>
@@ -1324,7 +1333,7 @@ void test() {
if((b = x != y)) {} // ok
if((x = f() != y)) {} // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.OpPrecedenceIifShift
<br>(C)</span><br><br>
@@ -1337,7 +1346,7 @@ void test() {
std::cout &lt;&lt; a ? "a" : "b"; // warn
a &lt;&lt; a&gt;7 ? 1 : 2; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.ObjectUnused
<br>(C++)</span><br><br>
@@ -1360,7 +1369,7 @@ void test() {
S(0, 0); // warn
std::exception(); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.StaticArrayPtrCompare
<br>(C)</span><br><br>
@@ -1374,7 +1383,7 @@ void test() {
int a2[1][1];
if (a2[0]) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.ConversionToBool
<br>maybe join with experimental.core.BoolAssignment<br>(C, C++)</span><br><br>
@@ -1384,7 +1393,7 @@ bool test() {
return 1.; // warn
return ""; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.ArrayBound
<br>enhancement to experimental.security.ArrayBound[v2]<br>(C, C++)</span><br><br>
@@ -1398,7 +1407,7 @@ void test() {
int i = 1;
if(p2[i]) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.StrcpyInputSize
<BR>enhancement to experimental.unix.cstring.OutOfBounds<br>(C)</span><br><br>
@@ -1408,7 +1417,7 @@ void test(char* string) {
char buf[24];
strcpy(buf, string); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.IntegerOverflow
<br>(C)</span><br><br>
@@ -1427,7 +1436,7 @@ void test() {
int y = INT_MAX/2+1; // warn
x = y*2; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.SignExtension
<br>(C)</span><br><br>
@@ -1451,7 +1460,7 @@ unsigned int test() {
ui = g(); // warn
return si; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.NumericTruncation
<br>(C)</span><br><br>
@@ -1475,7 +1484,7 @@ int test() {
ss = g(); // warn
return sll; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">different.MissingCopyCtorAssignOp
<br>(C, C++)</span><br><br>
@@ -1488,7 +1497,7 @@ public:
C() { p = new int; }
~C() { delete p; }
};
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
</table>
@@ -1513,7 +1522,7 @@ void test() {
NULL, TEXT("MyProgram.exe"), NULL, NULL,
TRUE, 0, NULL, NULL, &amp;si, &amp;pi);
} // warn
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">WinAPI.LoadLibrary
<br>(C)</span><br><br>
@@ -1525,7 +1534,7 @@ arbitrary location
void test() {
HINSTANCE h = LoadLibrary("X.dll"); // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">WinAPI.WideCharToMultiByte
<br>(C)</span><br><br>
@@ -1548,7 +1557,7 @@ void test()
else
s[res2] = 0;
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
</table>
@@ -1571,7 +1580,7 @@ struct A {
bool FirstIsZero(const struct A a) { // warn
return a.a[0] == 0;
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">optimization.PostfixIncIter
<br>(C++)</span><br><br>
@@ -1585,7 +1594,7 @@ void test() {
for(it = v.begin();
it != v.end(); it++) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">optimization.MultipleCallsStrlen
<br>(C)</span><br><br>
@@ -1600,7 +1609,7 @@ void test() {
if (strlen(s) &gt; 0 &amp;&amp;
strlen(s) &lt; 7) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">optimization.EmptyCstrDetect
<br>(C)</span><br><br>
@@ -1613,7 +1622,7 @@ void test() {
const char* s = "abc";
if (strlen(s) &gt; 0) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">optimization.StrLengthCalculation
<br>(C, C++)</span><br><br>
@@ -1627,7 +1636,7 @@ void test() {
std::string s;
if (strlen(s.c_str()) != 0) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
<tr><td><span class="name">optimization.EmptyContainerDetect
<br>(C, C++)</span><br><br>
@@ -1640,7 +1649,7 @@ void test() {
std::list&lt;int&gt; l;
if (l.size() != 0) {}; // warn
}
-</pre></td><td></td></tr>
+</pre></td><td class="aligned"></td></tr>
</table>
diff --git a/www/analyzer/release_notes.html b/www/analyzer/release_notes.html
index 60f323b7afa8..190695ef85fd 100644
--- a/www/analyzer/release_notes.html
+++ b/www/analyzer/release_notes.html
@@ -15,6 +15,47 @@
<h1>Release notes for <tt>checker-XXX</tt> builds</h1>
+<h4 id="checker_272">checker-272</h4>
+<p><b>built:</b> March 1, 2013</br>
+ <b>download:</b> <a href="https://attache.apple.com/AttacheWeb/dl?id=ATCbb91eedf8edf4c7388549be8f91e810d">checker-272.tar.bz2</a></p>
+ <p><b>highlights:</b></p>
+ <ul>
+ <li>Better modeling of C++ constructors:
+ <ul>
+ <li>Interprocedural analysis support for constructors of types with trivial destructors</li>
+ <li>Efficient model of trivial copy and move constructors</li>
+ </ul>
+ </li>
+ <li>Better diagnostics for loops that execute 0 times</li>
+ <li>Fixes a linking issue that prevented the checker from running on OS X v10.6 and earlier</li>
+ <li>Fixes for misc. crashes and false positives</li>
+ </ul>
+
+<h4 id="checker_271">checker-271</h4>
+<p><b>built:</b> February 8, 2013</br>
+ <b>download:</b> <a href="http://bit.ly/1299Xt3">checker-271.tar.bz2</a></p>
+ <p><b>highlights:</b></p>
+ <ul>
+ <li>Faster analysis for <tt>scan-build xcodebuild</tt> when using Xcode 4.6 and higher:
+ <ul>
+ <li><tt>scan-build</tt> now uses Xcode's built-in interposition mechanism for the static analyzer to provide faster builds while doing static analysis (PCH files are now built).</li>
+ <li>This change also allows <tt>scan-build</tt> to have better support for iOS project analysis without having to specifying weird SDK settings to <tt>scan-build</tt>.</li>
+ </ul></li>
+ <li>Better diagnostics for implicitly-defined member functions in C++.</li>
+ <li>New warning for <tt>malloc</tt>/<tt>free</tt> checker when passing <tt>malloc</tt>'ed pointer with non-zero offset to <tt>free()</tt>.
+ <li>Fixes for misc. parser crashes.</li>
+ <li>Newer than the static analyzer version in Xcode 4.6</li>
+ </ul>
+
+<h4 id="checker_270">checker-270</h4>
+<p><b>built:</b> January 4, 2013</br>
+ <b>download:</b> <a href="http://bit.ly/13ekSoV">checker-270.tar.bz2</a></p>
+ <p><b>highlights:</b></p>
+ <ul>
+ <li>Major performance enhancements to speed up interprocedural analysis.</li>
+ <li>Misc. bug fixes.</li>
+ </ul>
+
<h4 id="checker_269">checker-269</h4>
<p><b>built:</b> September 25, 2012</br>
<b>download:</b> <a href="http://bit.ly/USf8ge">checker-269.tar.bz2</a></p>
diff --git a/www/analyzer/xcode.html b/www/analyzer/xcode.html
index ac75a0475470..4bae1c15b868 100644
--- a/www/analyzer/xcode.html
+++ b/www/analyzer/xcode.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
- <title>Build and Analyze: running the analyzer within Xcode</title>
+ <title>Running the analyzer within Xcode</title>
<link type="text/css" rel="stylesheet" href="content.css">
<link type="text/css" rel="stylesheet" href="menu.css">
<script type="text/javascript" src="scripts/menu.js"></script>
@@ -14,15 +14,16 @@
<!--#include virtual="menu.html.incl"-->
<div id="content">
-<h1>Build and Analyze: running the analyzer within Xcode</h1>
+<h1>Running the analyzer within Xcode</h1>
<table style="margin-top:0px" width="100%" border="0" cellpadding="0px" cellspacing="0">
<tr><td>
<h3>What is it?</h3>
-<p><i>Build and Analyze</i> is an Xcode feature (introduced in Xcode 3.2) that
-allows users to run the Clang Static Analyzer <a
-href="http://developer.apple.com/mac/library/featuredarticles/StaticAnalysis/index.html">directly
+
+<p>Since Xcode 3.2, users have been able to run the Clang Static Analyzer
+<a
+href="https://developer.apple.com/library/mac/documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/060-Debug_Your_App/debug_app.html#//apple_ref/doc/uid/TP40010215-CH3-SW17">directly
within Xcode</a>.</p>
<p>It integrates directly with the Xcode build system and
@@ -45,23 +46,24 @@ presents analysis results directly within Xcode's editor.</p>
single keystroke or mouse click.</li>
<li><b>Transparency:</b> Works effortlessly with Xcode projects (including iPhone projects).
<li><b>Cons:</b> Doesn't work well with non-Xcode projects. For those,
- consider using <a href="/scan-build.html"><b>scan-build</b></a>.
+ consider using <a href="scan-build.html"><b>scan-build</b></a>.
</ul>
<h2>Getting Started</h2>
-<p>Xcode 3.2 is available as a free download from Apple, with <a
-href="http://developer.apple.com/mac/library/featuredarticles/StaticAnalysis/index.html">instructions available</a>
-for using <i>Build and Analyze</i>.</p>
+<p>Xcode is available as a free download from Apple on the <a
+href="https://itunes.apple.com/us/app/xcode/id497799835?mt=12">Mac
+App Store</a>, with <a
+href="https://developer.apple.com/library/mac/documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/060-Debug_Your_App/debug_app.html#//apple_ref/doc/uid/TP40010215-CH3-SW17">instructions
+available</a> for using the analyzer.</p>
-<h2>Using open source analyzer builds with <i>Build and Analyze</i></h2>
+<h2>Using open source analyzer builds with Xcode</h2>
<p>By default, Xcode uses the version of <tt>clang</tt> that came bundled with
-it to provide the results for <i>Build and Analyze</i>. It is possible to change
-Xcode's behavior to use an alternate version of <tt>clang</tt> for this purpose
-while continuing to use the <tt>clang</tt> that came with Xcode for compiling
-projects.</p>
+it to analyze your code. It is possible to change Xcode's behavior to use an
+alternate version of <tt>clang</tt> for this purpose while continuing to use
+the <tt>clang</tt> that came with Xcode for compiling projects.</p>
<h3>Why try open source builds?</h3>
@@ -78,7 +80,7 @@ issues.</p>
<p>Starting with analyzer build checker-234, analyzer builds contain a command
line utility called <tt>set-xcode-analyzer</tt> that allows users to change what
-copy of <tt>clang</tt> that Xcode uses for <i>Build and Analyze</i>:</p>
+copy of <tt>clang</tt> that Xcode uses for analysis:</p>
<pre class="code_example">
$ <b>set-xcode-analyzer -h</b>
@@ -93,8 +95,8 @@ Options:
</pre>
<p>Operationally, <b>set-xcode-analyzer</b> edits Xcode's configuration files
-(in <tt>/Developer</tt>) to point it to use the version of <tt>clang</tt> you
-specify for static analysis. Within this model it provides you two basic modes:</p>
+to point it to use the version of <tt>clang</tt> you specify for static
+analysis. Within this model it provides you two basic modes:</p>
<ul>
<li><b>--use-xcode-clang</b>: Switch Xcode (back) to using the <tt>clang</tt> that came bundled with it for static analysis.</li>
@@ -104,14 +106,14 @@ specify for static analysis. Within this model it provides you two basic modes:
<h4>Things to keep in mind</h4>
<ul>
-<li>You should quit Xcode prior to running <tt>set-xcode-analyzer</tt>.</li>
-<li>You will need to run <tt>set-xcode-analyzer</tt> under <b><tt>sudo</tt></b>
- in order to have write privileges to modify the Xcode configuration files.</li>
+ <li>You should quit Xcode prior to running <tt>set-xcode-analyzer</tt>.</li> <li>You will need to run <tt>set-xcode-analyzer</tt> under
+<b><tt>sudo</tt></b> in order to have write privileges to modify the Xcode
+configuration files.</li>
</ul>
<h4>Examples</h4>
-<p><b>Example 1</b>: Telling Xcode to use checker-235 for <i>Build and Analyze</i>:</p>
+<p><b>Example 1</b>: Telling Xcode to use checker-235:</p>
<pre class="code_example">
$ pwd
diff --git a/www/comparison.html b/www/comparison.html
index 01b8aea06905..e8b14923b688 100644
--- a/www/comparison.html
+++ b/www/comparison.html
@@ -52,7 +52,6 @@
FORTRAN, etc.</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>
diff --git a/www/compatibility.html b/www/compatibility.html
index 725c52ff4bbc..8bfaff191cb5 100644
--- a/www/compatibility.html
+++ b/www/compatibility.html
@@ -19,10 +19,10 @@
<h1>Language Compatibility</h1>
<!-- ======================================================================= -->
-<p>Clang strives to both conform to current language standards (C99,
- C++98) and also to implement many widely-used extensions available
+<p>Clang strives to both conform to current language standards (up to C11
+ and C++11) and also to implement many widely-used extensions available
in other compilers, so that most correct code will "just work" when
- compiler with Clang. However, Clang is more strict than other
+ compiled with Clang. However, Clang is more strict than other
popular compilers, and may reject incorrect code that other
compilers allow. This page documents common compatibility and
portability issues with Clang to help you understand and fix the
@@ -188,10 +188,9 @@ use the API calls instead of calls like <tt>__builtin_ia32_paddw128</tt>.</p>
different type. Clang produces an error on similar code, e.g.,</p>
<pre>
-lvalue.c:2:3: error: assignment to cast is illegal, lvalue casts are not
- supported
+<b>lvalue.c:2:3: <span class="error">error:</span> assignment to cast is illegal, lvalue casts are not supported</b>
(int*)addr = val;
- ^~~~~~~~~~ ~
+<span class="caret"> ^~~~~~~~~~ ~</span>
</pre>
<p>To fix this problem, move the cast to the right-hand side. In this
@@ -232,12 +231,12 @@ the stack is fresh, i.e. still zeroed.) Therefore, Clang rejects this
code with a hard error:</p>
<pre>
-t.c:3:5: error: goto into protected scope
+<b>t.c:3:5: <span class="error">error:</span> goto into protected scope</b>
goto error;
- ^
-t.c:5:15: note: jump bypasses setup of __block variable
+<span class="caret"> ^</span>
+<b>t.c:5:15: <span class="note">note:</note></b> jump bypasses setup of __block variable
__block int result;
- ^
+<span class="caret"> ^</span>
</pre>
<p>The fix is to rewrite the code to not require jumping into a
@@ -308,10 +307,9 @@ rejects the instruction with this error message:
</p>
<pre>
-&lt;inline asm&gt;:3:1: error: ambiguous instructions require an explicit suffix (could be 'addb', 'addw', 'addl', or 'addq')
+<b>&lt;inline asm&gt;:3:1: <span class="error">error:</span> ambiguous instructions require an explicit suffix (could be 'addb', 'addw', 'addl', or 'addq')</b>
add $4, (%rax)
-^
-1 error generated.
+<span class="caret">^</span>
</pre>
<p>To fix this compatibility issue, add an explicit suffix to the instruction:
@@ -331,9 +329,9 @@ can, among other things, be cast to a different type. Clang treats
type-cast of <code>super</code>:</p>
<pre>
-super.m:11:12: error: cannot cast 'super' (it isn't an expression)
+<b>super.m:11:12: <span class="error">error:</span> cannot cast 'super' (it isn't an expression)</b>
[(Super*)super add:4];
- ~~~~~~~~^
+<span class="caret"> ~~~~~~~~^</span>
</pre>
<p>To fix this problem, remove the type cast, e.g.</p>
@@ -352,10 +350,9 @@ Objective-C class may change over time as instance variables are added
ABI:</p>
<pre>
-sizeof.m:4:14: error: invalid application of 'sizeof' to interface 'NSArray' in
- non-fragile ABI
+<b>sizeof.m:4:14: <span class="error">error:</span> invalid application of 'sizeof' to interface 'NSArray' in non-fragile ABI</b>
int size = sizeof(NSArray);
- ^ ~~~~~~~~~
+<span class="caret"> ^ ~~~~~~~~~</span>
</pre>
<p>Code that relies on the size of an Objective-C class is likely to
@@ -377,12 +374,12 @@ this problem, use the Objective-C runtime API function
internal Objective-C structures as implementation detail and won't do implicit conversions:
<pre>
-t.mm:11:2: error: no matching function for call to 'f'
+<b>t.mm:11:2: <span class="error">error:</span> no matching function for call to 'f'</b>
f((struct objc_object *)p);
- ^
-t.mm:5:6: note: candidate function not viable: no known conversion from 'struct objc_object *' to 'id' for 1st argument
+<span class="caret"> ^</span>
+<b>t.mm:5:6: <span class="note">note:</note></b> candidate function not viable: no known conversion from 'struct objc_object *' to 'id' for 1st argument
void f(id x);
- ^
+<span class="caret"> ^</span>
</pre>
<p>Code should use types <tt>id</tt>, <tt>SEL</tt>, and <tt>Class</tt>
@@ -465,15 +462,16 @@ int main() {
<p>Clang complains:
-<pre> <b>my_file.cpp:2:10: <span class="error">error:</span> call to function 'Multiply' that is neither visible in the template definition nor found by argument-dependent lookup</b>
- return Multiply(x, x);
- <span class="caret"> ^</span>
- <b>my_file.cpp:10:3: <span class="note">note:</span> in instantiation of function template specialization 'Squared&lt;int&gt;' requested here</b>
- Squared(5);
- <span class="caret"> ^</span>
- <b>my_file.cpp:5:5: <span class="note">note:</span> 'Multiply' should be declared prior to the call site</b>
- int Multiply(int x, int y) {
- <span class="caret"> ^</span>
+<pre>
+<b>my_file.cpp:2:10: <span class="error">error:</span> call to function 'Multiply' that is neither visible in the template definition nor found by argument-dependent lookup</b>
+ return Multiply(x, x);
+<span class="caret"> ^</span>
+<b>my_file.cpp:10:3: <span class="note">note:</span></b> in instantiation of function template specialization 'Squared&lt;int&gt;' requested here
+ Squared(5);
+<span class="caret"> ^</span>
+<b>my_file.cpp:5:5: <span class="note">note:</span></b> 'Multiply' should be declared prior to the call site
+int Multiply(int x, int y) {
+<span class="caret"> ^</span>
</pre>
<p>The C++ standard says that unqualified names like <q>Multiply</q>
@@ -526,15 +524,16 @@ void Use() {
<p>Again, Clang complains:</p>
-<pre> <b>my_file2.cpp:5:13: <span class="error">error:</span> call to function 'operator&lt;&lt;' that is neither visible in the template definition nor found by argument-dependent lookup</b>
- std::cout &lt;&lt; value &lt;&lt; "\n";
- <span class="caret"> ^</span>
- <b>my_file2.cpp:17:3: <span class="error">note:</span> in instantiation of function template specialization 'Dump&lt;ns::Data&gt;' requested here</b>
- Dump(ns::Data());
- <span class="caret"> ^</span>
- <b>my_file2.cpp:12:15: <span class="error">note:</span> 'operator&lt;&lt;' should be declared prior to the call site or in namespace 'ns'</b>
- std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out, ns::Data data) {
- <span class="caret"> ^</span>
+<pre>
+<b>my_file2.cpp:5:13: <span class="error">error:</span> call to function 'operator&lt;&lt;' that is neither visible in the template definition nor found by argument-dependent lookup</b>
+ std::cout &lt;&lt; value &lt;&lt; "\n";
+<span class="caret"> ^</span>
+<b>my_file2.cpp:17:3: <span class="note">note:</span></b> in instantiation of function template specialization 'Dump&lt;ns::Data&gt;' requested here
+ Dump(ns::Data());
+<span class="caret"> ^</span>
+<b>my_file2.cpp:12:15: <span class="note">note:</span></b> 'operator&lt;&lt;' should be declared prior to the call site or in namespace 'ns'
+std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out, ns::Data data) {
+<span class="caret"> ^</span>
</pre>
<p>Just like before, unqualified lookup didn't find any declarations
@@ -587,18 +586,18 @@ Clang correctly rejects it with the following errors
(when <tt>Derived</tt> is eventually instantiated):
<pre>
-my_file.cpp:8:5: error: use of undeclared identifier 'DoThis'
+<b>my_file.cpp:8:5: <span class="error">error:</span> use of undeclared identifier 'DoThis'</b>
DoThis(x);
- ^
+<span class="caret"> ^</span>
this-&gt;
-my_file.cpp:2:8: note: must qualify identifier to find this declaration in dependent base class
+<b>my_file.cpp:2:8: <span class="note">note:</note></b> must qualify identifier to find this declaration in dependent base class
void DoThis(T x) {}
- ^
-my_file.cpp:9:5: error: use of undeclared identifier 'DoThat'
+<span class="caret"> ^</span>
+<b>my_file.cpp:9:5: <span class="error">error:</span> use of undeclared identifier 'DoThat'</b>
DoThat(x);
- ^
+<span class="caret"> ^</span>
this-&gt;
-my_file.cpp:3:15: note: must qualify identifier to find this declaration in dependent base class
+<b>my_file.cpp:3:15: <span class="note">note:</note></b> must qualify identifier to find this declaration in dependent base class
static void DoThat(T x) {}
</pre>
@@ -820,13 +819,13 @@ void g(Base *p) {
<p>Clang produces the following error:</p>
<pre>
-downcast.mm:6:3: error: no matching function for call to 'f'
+<b>downcast.mm:6:3: <span class="error">error:</span> no matching function for call to 'f'</b>
f(p);
- ^
-downcast.mm:4:6: note: candidate function not viable: cannot convert from
+<span class="caret"> ^</span>
+<b>downcast.mm:4:6: <span class="note">note:</note></b> candidate function not viable: cannot convert from
superclass 'Base *' to subclass 'Derived *' for 1st argument
void f(Derived *p);
- ^
+<span class="caret"> ^</span>
</pre>
<p>If the downcast is actually correct (e.g., because the code has
diff --git a/www/cxx_status.html b/www/cxx_status.html
index e2ab51fc17c6..ac1862a9ce6c 100644
--- a/www/cxx_status.html
+++ b/www/cxx_status.html
@@ -11,6 +11,7 @@
.svn { background-color: #FFFF99 }
.full { background-color: #CCFF99 }
.na { background-color: #DDDDDD }
+ span:target { background-color: #FFFFBB; outline: #DDDD55 solid thin; }
th { background-color: #FFDDAA }
</style>
</head>
@@ -23,7 +24,7 @@
<!--*************************************************************************-->
<h1>C++98 and C++11 Support in Clang</h1>
<!--*************************************************************************-->
-<p>Last updated: $Date: 2012-10-23 02:32:41 +0200 (Tue, 23 Oct 2012) $</p>
+<p>Last updated: $Date: 2013-03-18 22:57:52 +0100 (Mon, 18 Mar 2013) $</p>
<h2 id="cxx98">C++98 implementation status</h2>
@@ -38,9 +39,11 @@
<p>Clang provides support for a number of features included in the new <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">ISO C++ Standard, ISO/IEC 14882:2011</a>. The following table describes which C++11 features have been implemented in Clang and in which Clang versions they became available.</p>
-<p>You can use Clang in C++11 mode either
-with <a href="http://libcxx.llvm.org/">libc++</a> or with gcc's libstdc++.
-Patches are needed to make <a href="libstdc++4.4-clang0x.patch">libstdc++-4.4</a>
+<p>By default, Clang builds C++ code according to the C++98 standard, with many
+C++11 features accepted as extensions. You can use Clang in C++11 mode with the
+<code>-std=c++11</code> option. Clang's C++11 mode can be used
+with <a href="http://libcxx.llvm.org/">libc++</a> or with gcc's libstdc++, but
+patches are needed to make <a href="libstdc++4.4-clang0x.patch">libstdc++-4.4</a>
work with Clang in C++11 mode. Patches are also needed to make
<a href="libstdc++4.6-clang11.patch">libstdc++-4.6</a>,
and <a href="libstdc++4.7-clang11.patch">libstdc++-4.7</a> work with Clang
@@ -171,7 +174,7 @@ releases prior to version 3.2 in C++11 mode.</p>
<tr>
<td>Generalized attributes</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">N2761</a></td>
- <td class="none" align="center">No</td>
+ <td class="svn" align="center">SVN <a href="#n2761">(1)</a></td>
</tr>
<tr>
<td>Generalized constant expressions</td>
@@ -181,7 +184,7 @@ releases prior to version 3.2 in C++11 mode.</p>
<tr>
<td>Alignment support</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf">N2341</a></td>
- <td class="full" align="center">Clang 3.0</td>
+ <td class="svn" align="center">SVN</td>
</tr>
<!-- Skipped N1627: Conditionally-support behavior -->
<!-- Skipped N1727: Changing Undefined Behavior into Diagnosable Errors -->
@@ -300,7 +303,7 @@ releases prior to version 3.2 in C++11 mode.</p>
<tr>
<td>Sequence points</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html">N2239</a></td>
- <td class="none" align="center">No</td>
+ <td class="svn" align="center">SVN</td>
</tr>
<tr>
<td>Atomic operations</td>
@@ -310,7 +313,7 @@ releases prior to version 3.2 in C++11 mode.</p>
<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="full" align="center">Clang 3.1</td>
+ <td class="full" align="center">Clang 3.1 <a href="#n2748">(2)</a></td>
</tr>
<tr>
<td>Bidirectional Fences</td>
@@ -321,12 +324,12 @@ releases prior to version 3.2 in C++11 mode.</p>
<tr>
<td>Memory model</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm">N2429</a></td>
- <td class="none" align="center">No</td>
+ <td class="full" align="center">Clang 3.2</td>
</tr>
<tr>
<td>Data-dependency ordering: atomics and memory model</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm">N2664</a></td>
- <td class="none" align="center">No</td>
+ <td class="full" align="center">Clang 3.2 <a href="#n2664">(3)</a></td>
</tr>
<tr>
<td>Propagating exceptions</td>
@@ -351,7 +354,7 @@ releases prior to version 3.2 in C++11 mode.</p>
<tr>
<td>Dynamic initialization and destruction with concurrency</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">N2660</a></td>
- <td class="none" align="center">No</td>
+ <td class="full" align="center">Clang 2.9</td>
</tr>
<tr class="separator">
@@ -375,9 +378,22 @@ releases prior to version 3.2 in C++11 mode.</p>
<tr>
<td>Extended integral types</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf">N1988</a></td>
- <td class="none" align="center">No</td>
+ <td class="na" align="center">N/A <a href="#n1988">(4)</a></td>
</tr>
</table>
+
+<p>
+<span id="n2761">(1): The <code>[[carries_dependency]]</code> attribute
+has no effect.</span><br>
+<span id="n2748">(2): All compare-exchange operations are emitted as
+strong compare-exchanges.</span><br>
+<span id="n2664">(3): <code>memory_order_consume</code> is lowered to
+<code>memory_order_acquire</code>.</span><br>
+<span id="n1988">(4): <code>__int128</code> is not treated as an extended
+integer type, because changing <code>intmax_t</code> would be an
+ABI-incompatible change.</span>
+</p>
+
</div>
</body>
</html>
diff --git a/www/get_started.html b/www/get_started.html
index 7756f9e2e47b..20ccaf157f93 100644
--- a/www/get_started.html
+++ b/www/get_started.html
@@ -85,12 +85,12 @@ follows:</p>
<li>Note: For subsequent Clang development, you can just do make at the
clang directory level.</li>
<li>It is also possible to use CMake instead of the makefiles. With CMake
- it is also possible to generate project files for several IDEs: Eclipse
+ it is possible to generate project files for several IDEs: Xcode, Eclipse
CDT4, CodeBlocks, Qt-Creator (use the CodeBlocks generator), KDevelop3.</li>
</ul>
</li>
- <li>If you intend to work on Clang C++ support, you may need to tell it how
+ <li>If you intend to use Clang's C++ support, you may need to tell it how
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
@@ -138,7 +138,7 @@ Visual Studio:</p>
<li><b>Subversion</b>. Source code control program. Get it from:
<a href="http://subversion.tigris.org/getting.html">
http://subversion.tigris.org/getting.html</a></li>
- <li><b>cmake</b>. This is used for generating Visual Studio solution and
+ <li><b>CMake</b>. This is used for generating Visual Studio solution and
project files. Get it from:
<a href="http://www.cmake.org/cmake/resources/software.html">
http://www.cmake.org/cmake/resources/software.html</a></li>
@@ -169,19 +169,19 @@ Visual Studio:</p>
<li><tt>svn co http://llvm.org/svn/llvm-project/cfe/trunk clang</tt></li>
</ul>
</li>
- <li>Run cmake to generate the Visual Studio solution and project files:
+ <li>Run CMake to generate the Visual Studio solution and project files:
<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>
<li>If you are using Visual Studio 2008: <tt>cmake -G "Visual Studio 9 2008" ..\llvm</tt></li>
<li>Or if you are using Visual Studio 2010: <tt>cmake -G "Visual Studio 10" ..\llvm</tt></li>
- <li>By default, cmake will target LLVM to X86. If you want all targets
+ <li>By default, CMake will target LLVM to X86. If you want all targets
(needed if you want to run the LLVM tests), add the <tt>-DLLVM_TARGETS_TO_BUILD=all</tt> option to the
- cmake command line. Or specify a target from the LLVM_TARGETS_TO_BUILD
+ CMake command line. Or specify a target from the LLVM_TARGETS_TO_BUILD
definition in CMakeLists.txt.</li>
<li>See the <a href="http://www.llvm.org/docs/CMake.html">LLVM CMake guide</a> for
- more information on other configuration options for cmake.</li>
+ more information on other configuration options for CMake.</li>
<li>The above, if successful, will have created an LLVM.sln file in the
<tt>build</tt> directory.
</ul>
diff --git a/www/hacking.html b/www/hacking.html
index aa13b8d0eb89..a1ff8d4efd43 100644
--- a/www/hacking.html
+++ b/www/hacking.html
@@ -87,6 +87,10 @@
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>
+ <li>For <a href="http://lldb.llvm.org"> <tt>LLDB</tt></a> users there are
+ data formatters for clang data structures in
+ <a href="http://llvm.org/svn/llvm-project/cfe/trunk/utils/ClangDataFormat.py">
+ <tt>utils/ClangDataFormat.py</tt></a>.</li>
</ul>
<!--=====================================================================-->
diff --git a/www/menu.html.incl b/www/menu.html.incl
index 2c00d0fa1e85..4a36614b909f 100644
--- a/www/menu.html.incl
+++ b/www/menu.html.incl
@@ -22,7 +22,6 @@
<a href="/OpenProjects.html">Open&nbsp;Projects</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">
@@ -33,6 +32,7 @@
<div class="submenu">
<label>Communication</label>
+ <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users">cfe-users List</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">cfe-dev List</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">cfe-commits List</a>
<a href="irc://irc.oftc.net/llvm">IRC: irc.oftc.net#llvm</a>
diff --git a/www/performance-2008-10-31.html b/www/performance-2008-10-31.html
deleted file mode 100644
index b2876670d3b1..000000000000
--- a/www/performance-2008-10-31.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!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 - Performance</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>Clang - Performance</h1>
-<!--*************************************************************************-->
-
-<p>This page tracks the compile time performance of Clang on two
-interesting benchmarks:</p>
-<ul>
- <li><i>Sketch</i>: The Objective-C example application shipped on
- Mac OS X as part of Xcode. <i>Sketch</i> is indicative of a
- "typical" Objective-C app. The source itself has a relatively
- small amount of code (~7,500 lines of source code), but it relies
- on the extensive Cocoa APIs to build its functionality. Like many
- Objective-C applications, it includes
- <tt>Cocoa/Cocoa.h</tt> in all of its source files, which represents a
- significant stress test of the front-end's performance on lexing,
- preprocessing, parsing, and syntax analysis.</li>
- <li><i>176.gcc</i>: This is the gcc-2.7.2.2 code base as present in
- SPECINT 2000. In contrast to Sketch, <i>176.gcc</i> consists of a
- large amount of C source code (~220,000 lines) with few system
- dependencies. This stresses the back-end's performance on generating
- assembly code and debug information.</li>
-</ul>
-
-<!--*************************************************************************-->
-<h2><a name="enduser">Experiments</a></h2>
-<!--*************************************************************************-->
-
-<p>Measurements are done by serially processing each file in the
-respective benchmark, using Clang, gcc, and llvm-gcc as compilers. In
-order to track the performance of various subsystems the timings have
-been broken down into separate stages where possible:</p>
-
-<ul>
- <li><tt>-Eonly</tt>: This option runs the preprocessor but does not
- perform any output. For gcc and llvm-gcc, the -MM option is used
- as a rough equivalent to this step.</li>
- <li><tt>-parse-noop</tt>: This option runs the parser on the input,
- but without semantic analysis or any output. gcc and llvm-gcc have
- no equivalent for this option.</li>
- <li><tt>-fsyntax-only</tt>: This option runs the parser with semantic
- analysis.</li>
- <li><tt>-emit-llvm -O0</tt>: For Clang and llvm-gcc, this option
- converts to the LLVM intermediate representation but doesn't
- generate native code.</li>
- <li><tt>-S -O0</tt>: Perform actual code generation to produce a
- native assembler file.</li>
- <li><tt>-S -O0 -g</tt>: This adds emission of debug information to
- the assembly output.</li>
-</ul>
-
-<p>This set of stages is chosen to be approximately additive, that is
-each subsequent stage simply adds some additional processing. The
-timings measure the delta of the given stage from the previous
-one. For example, the timings for <tt>-fsyntax-only</tt> below show
-the difference of running with <tt>-fsyntax-only</tt> versus running
-with <tt>-parse-noop</tt> (for clang) or <tt>-MM</tt> with gcc and
-llvm-gcc. This amounts to a fairly accurate measure of only the time
-to perform semantic analysis (and parsing, in the case of gcc and llvm-gcc).</p>
-
-<p>These timings are chosen to break down the compilation process for
-clang as much as possible. The graphs below show these numbers
-combined so that it is easy to see how the time for a particular task
-is divided among various components. For example, <tt>-S -O0</tt>
-includes the time of <tt>-fsyntax-only</tt> and <tt>-emit-llvm -O0</tt>.</p>
-
-<p>Note that we already know that the LLVM optimizers are substantially (30-40%)
-faster than the GCC optimizers at a given -O level, so we only focus on -O0
-compile time here.</p>
-
-<!--*************************************************************************-->
-<h2><a name="enduser">Timing Results</a></h2>
-<!--*************************************************************************-->
-
-<!--=======================================================================-->
-<h3><a name="2008-10-31">2008-10-31</a></h3>
-<!--=======================================================================-->
-
-<h4 style="text-align:center">Sketch</h4>
-<img class="img_slide"
- src="timing-data/2008-10-31/sketch.png" alt="Sketch Timings">
-
-<p>This shows Clang's substantial performance improvements in
-preprocessing and semantic analysis; over 90% faster on
--fsyntax-only. As expected, time spent in code generation for this
-benchmark is relatively small. One caveat, Clang's debug information
-generation for Objective-C is very incomplete; this means the <tt>-S
--O0 -g</tt> numbers are unfair since Clang is generating substantially
-less output.</p>
-
-<p>This chart also shows the effect of using precompiled headers (PCH)
-on compiler time. gcc and llvm-gcc see a large performance improvement
-with PCH; about 4x in wall time. Unfortunately, Clang does not yet
-have an implementation of PCH-style optimizations, but we are actively
-working to address this.</p>
-
-<h4 style="text-align:center">176.gcc</h4>
-<img class="img_slide"
- src="timing-data/2008-10-31/176.gcc.png" alt="176.gcc Timings">
-
-<p>Unlike the <i>Sketch</i> timings, compilation of <i>176.gcc</i>
-involves a large amount of code generation. The time spent in Clang's
-LLVM IR generation and code generation is on par with gcc's code
-generation time but the improved parsing & semantic analysis
-performance means Clang still comes in at ~29% faster versus gcc
-on <tt>-S -O0 -g</tt> and ~20% faster versus llvm-gcc.</p>
-
-<p>These numbers indicate that Clang still has room for improvement in
-several areas, notably our LLVM IR generation is significantly slower
-than that of llvm-gcc, and both Clang and llvm-gcc incur a
-significantly higher cost for adding debugging information compared to
-gcc.</p>
-
-</div>
-</body>
-</html>
diff --git a/www/performance-2009-03-02.html b/www/performance-2009-03-02.html
deleted file mode 100644
index 3e8c41110536..000000000000
--- a/www/performance-2009-03-02.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<!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 - Performance</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>Clang - Performance</h1>
-<!--*************************************************************************-->
-
-<p>This page shows the compile time performance of Clang on two
-interesting benchmarks:</p>
-<ul>
- <li><i>Sketch</i>: The Objective-C example application shipped on
- Mac OS X as part of Xcode. <i>Sketch</i> is indicative of a
- "typical" Objective-C app. The source itself has a relatively
- small amount of code (~7,500 lines of source code), but it relies
- on the extensive Cocoa APIs to build its functionality. Like many
- Objective-C applications, it includes <tt>Cocoa/Cocoa.h</tt> in
- all of its source files, which represents a significant stress
- test of the front-end's performance on lexing, preprocessing,
- parsing, and syntax analysis.</li>
- <li><i>176.gcc</i>: This is the gcc-2.7.2.2 code base as present in
- SPECINT 2000. In contrast to Sketch, <i>176.gcc</i> consists of a
- large amount of C source code (~200,000 lines) with few system
- dependencies. This stresses the back-end's performance on generating
- assembly code and debug information.</li>
-</ul>
-
-<p>
-For previous performance numbers, please
-go <a href="performance-2008-10-31.html">here</a>.
-</p>
-
-<!--*************************************************************************-->
-<h2><a name="experiments">Experiments</a></h2>
-<!--*************************************************************************-->
-
-<p>Measurements are done by running a full build (using xcodebuild or
-make for Sketch and 176.gcc respectively) using Clang and gcc 4.2 as
-compilers; gcc is run both with and without the new clang driver (ccc)
-in order to evaluate the overhead of the driver itself.</p>
-
-<p>In order to track the performance of various subsystems the timings
-have been broken down into separate stages where possible. This is
-done by over-riding the CC environment variable used during the build
-to point to one of a few simple shell scripts which may skip part of
-the build.</p>
-
-<ul>
- <li><tt>non-compiler</tt>: The overhead of the build system itself;
- for Sketch this also includes the time to build/copy various
- non-source code resource files.</li>
- <li><tt>+ driver</tt>: Add execution of the driver, but do not execute any
- commands (by using the -### driver option).</li>
- <li><tt>+ pch gen</tt>: Add generation of PCH files.</li>
- <li><tt>+ cpp</tt>: Add preprocessing of source files (this time is
- include in syntax for gcc).</li>
- <li><tt>+ parse</tt>: Add parsing of source files (this time is
- include in syntax for gcc).</li>
- <li><tt>+ syntax</tt>: Add semantic checking of source files (for
- gcc, this includes preprocessing and parsing as well).</li>
- <li><tt>+ IRgen</tt>: Add generation of LLVM IR (gcc has no
- corresponding phase).</li>
- <li><tt>+ codegen</tt>: Add generation of assembler files.</li>
- <li><tt>+ assembler</tt>: Add assembler time to generate .o files.</li>
- <li><tt>+ linker</tt>: Add linker time.</li>
-</ul>
-
-<p>This set of stages is chosen to be approximately additive, that is
-each subsequent stage simply adds some additional processing. The
-timings measure the delta of the given stage from the previous
-one. For example, the timings for <tt>+ syntax</tt> below show the
-difference of running with <tt>+ syntax</tt> versus running with <tt>+
-parse</tt> (for clang) or <tt>+ driver</tt> with gcc. This amounts to
-a fairly accurate measure of only the time to perform semantic
-analysis (and preprocessing/parsing, in the case of gcc).</p>
-
-<!--*************************************************************************-->
-<h2><a name="timings">Timing Results</a></h2>
-<!--*************************************************************************-->
-
-<!--=======================================================================-->
-<h3><a name="2009-03-02">2009-03-02</a></h3>
-<!--=======================================================================-->
-
-<a href="timing-data/2009-03-02/sketch.pdf">
-<img class="img_slide"
- src="timing-data/2009-03-02/sketch.png" alt="Sketch Timings">
-</a>
-
-<a href="timing-data/2009-03-02/176.gcc.pdf">
-<img class="img_slide"
- src="timing-data/2009-03-02/176.gcc.png" alt="176.gcc Timings">
-</a>
-
-</div>
-</body>
-</html>
diff --git a/www/performance.html b/www/performance.html
deleted file mode 100644
index e85f19185544..000000000000
--- a/www/performance.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!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 - Performance</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>Clang - Performance</h1>
-<!--*************************************************************************-->
-
-<p>This page shows the compile time performance of Clang on two
-interesting benchmarks:</p>
-<ul>
- <li><i>Sketch</i>: The Objective-C example application shipped on
- Mac OS X as part of Xcode. <i>Sketch</i> is indicative of a
- "typical" Objective-C app. The source itself has a relatively
- small amount of code (~7,500 lines of source code), but it relies
- on the extensive Cocoa APIs to build its functionality. Like many
- Objective-C applications, it includes <tt>Cocoa/Cocoa.h</tt> in
- all of its source files, which represents a significant stress
- test of the front-end's performance on lexing, preprocessing,
- parsing, and syntax analysis.</li>
- <li><i>176.gcc</i>: This is the gcc-2.7.2.2 code base as present in
- SPECINT 2000. In contrast to Sketch, <i>176.gcc</i> consists of a
- large amount of C source code (~200,000 lines) with few system
- dependencies. This stresses the back-end's performance on generating
- assembly code and debug information.</li>
-</ul>
-
-<p>
-For previous performance numbers, please
-go <a href="performance-2009-03-02.html">here</a>.
-</p>
-
-<!--*************************************************************************-->
-<h2><a name="experiments">Experiments</a></h2>
-<!--*************************************************************************-->
-
-<p>Measurements are done by running a full build (using xcodebuild or
-make for Sketch and 176.gcc respectively) using Clang and gcc 4.2 as
-compilers.</p>
-
-<p>In order to track the performance of various subsystems the timings
-have been broken down into separate stages where possible. This is
-done by over-riding the CC environment variable used during the build
-to point to one of a few simple shell scripts which may skip part of
-the build.</p>
-
-<ul>
- <li><tt>non-compiler</tt>: The overhead of the build system itself;
- for Sketch this also includes the time to build/copy various
- non-source code resource files.</li>
- <li><tt>+ driver</tt>: Add execution of the driver, but do not execute any
- commands (by using the -### driver option).</li>
- <li><tt>+ pch gen</tt>: Add generation of PCH files (if used).</li>
- <li><tt>+ syntax</tt>: Add preprocessing, parsing, and semantic checking of
- source files.</li>
- <li><tt>+ IRgen</tt>: Add generation of LLVM IR (gcc has no
- corresponding phase).</li>
- <li><tt>+ codegen</tt>: Add generation of assembler files.</li>
- <li><tt>+ assembler</tt>: Add assembler time to generate .o files.</li>
- <li><tt>+ linker</tt>: Add linker time.</li>
-</ul>
-
-<p>This set of stages is chosen to be approximately additive, that is each
-subsequent stage simply adds some additional processing. The timings measure the
-delta of the given stage from the previous one. For example, the timings
-for <tt>+ syntax</tt> below show the difference of running with <tt>+
-syntax</tt> versus the times for <tt>+ pch gen</tt>. This amounts to a fairly
-accurate measure of only the time to perform preprocessing, parsing, and
-semantic analysis after PCH generation is done.</p>
-
-<!--*************************************************************************-->
-<h2><a name="timings">Timing Results</a></h2>
-<!--*************************************************************************-->
-
-<!--=======================================================================-->
-<h3><a name="2009-06-26">2009-06-26</a></h3>
-<!--=======================================================================-->
-
-<a href="timing-data/2009-06-26/sketch.pdf">
-<img class="img_slide"
- src="timing-data/2009-06-26/sketch.png" alt="Sketch Timings">
-</a>
-
-<a href="timing-data/2009-06-26/176.gcc.pdf">
-<img class="img_slide"
- src="timing-data/2009-06-26/176.gcc.png" alt="176.gcc Timings">
-</a>
-
-</div>
-</body>
-</html>