diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /www | |
parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) | |
download | src-45b533945f0851ec234ca846e1af5ee1e4df0b6e.tar.gz src-45b533945f0851ec234ca846e1af5ee1e4df0b6e.zip |
Vendor import of clang trunk r256633:vendor/clang/clang-trunk-r256633
Notes
Notes:
svn path=/vendor/clang/dist/; revision=292920
svn path=/vendor/clang/clang-trunk-r256633/; revision=292923; tag=vendor/clang/clang-trunk-r256633
Diffstat (limited to 'www')
-rw-r--r-- | www/analyzer/faq.html | 14 | ||||
-rw-r--r-- | www/analyzer/index.html | 2 | ||||
-rw-r--r-- | www/analyzer/installation.html | 9 | ||||
-rw-r--r-- | www/analyzer/latest_checker.html.incl | 2 | ||||
-rw-r--r-- | www/analyzer/release_notes.html | 30 | ||||
-rw-r--r-- | www/analyzer/scan-build.html | 10 | ||||
-rw-r--r-- | www/analyzer/xcode.html | 4 | ||||
-rw-r--r-- | www/comparison.html | 17 | ||||
-rw-r--r-- | www/cxx_dr_status.html | 4 | ||||
-rw-r--r-- | www/cxx_status.html | 76 | ||||
-rw-r--r-- | www/get_started.html | 10 | ||||
-rw-r--r-- | www/related.html | 11 |
12 files changed, 149 insertions, 40 deletions
diff --git a/www/analyzer/faq.html b/www/analyzer/faq.html index 129bfb63bb1b..9d2962b1121a 100644 --- a/www/analyzer/faq.html +++ b/www/analyzer/faq.html @@ -26,6 +26,8 @@ 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="#dead_store">How do I tell the static analyzer that I don't care about a specific dead store?</a></li> + <li><a href="#unused_ivar">How do I tell the static analyzer that I don't care about a specific unused instance variable in Objective C?</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> @@ -64,6 +66,18 @@ int foo(int *b) { return *b; }</pre> +<h4 id="dead_store" class="faq">Q: How do I tell the static analyzer that I don't care about a specific dead store?</h4> + +<p>When the analyzer sees that a value stored into a variable is never used, it's going to produce a message similar to this one: +<pre class="code_example">Value stored to 'x' is never read</pre> +You can use the <tt>(void)x;</tt> idiom to acknowledge that there is a dead store in your code but you do not want it to be reported in the future.</p> + +<h4 id="unused_ivar" class="faq">Q: How do I tell the static analyzer that I don't care about a specific unused instance variable in Objective C?</h4> + +<p>When the analyzer sees that a value stored into a variable is never used, it is going to produce a message similar to this one: +<pre class="code_example">Instance variable 'commonName' in class 'HappyBird' is never used by the methods in its @implementation</pre> +You can add <tt>__attribute__((unused))</tt> to the instance variable declaration to suppress the warning.</p> + <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"> diff --git a/www/analyzer/index.html b/www/analyzer/index.html index 33e858179df5..98e295e28da3 100644 --- a/www/analyzer/index.html +++ b/www/analyzer/index.html @@ -95,7 +95,7 @@ applications.</p> <div style="padding:15px"> <h3 style="margin:0px;padding:0px">Mac OS X</h3> <ul> - <li>Latest build (Intel-only binary, 10.5+):<br> + <li>Latest build (10.7+):<br> <!--#include virtual="latest_checker.html.incl"--> </li> <li><a href="/release_notes.html">Release notes</a></li> diff --git a/www/analyzer/installation.html b/www/analyzer/installation.html index 54a5da51adcf..6a855999c5ff 100644 --- a/www/analyzer/installation.html +++ b/www/analyzer/installation.html @@ -23,7 +23,7 @@ get started analyzing your code.</p> <h2>Packaged Builds (Mac OS X)</h2> <p>Semi-regular pre-built binaries of the analyzer are available on Mac -OS X. These are built to run on Mac OS 10.5 and later.</p> +OS X. These are built to run on OS X 10.7 and later.</p> <p>Builds are released frequently. Often the differences between build numbers being a few bug fixes or minor feature improvements. When using @@ -100,11 +100,8 @@ binaries to the installation directory of your choice (specified when you run <li>The locations of the <tt>scan-build</tt> and <tt>scan-view</tt> programs. -<p>Currently these are not installed using <tt>make install</tt>, and -are located in <tt>$(SRCDIR)/tools/clang/tools/scan-build</tt> and -<tt>$(SRCDIR)/tools/clang/tools/scan-view</tt> respectively (where -<tt>$(SRCDIR)</tt> is the root LLVM source directory). These locations -are subject to change.</p></li> +<p>These are installed via <tt>make install</tt> into the bin directory +when clang is built.</p></li> </ul> </div> diff --git a/www/analyzer/latest_checker.html.incl b/www/analyzer/latest_checker.html.incl index 99ed3d8898ae..84d64e61a9a9 100644 --- a/www/analyzer/latest_checker.html.incl +++ b/www/analyzer/latest_checker.html.incl @@ -1 +1 @@ -<b><a href="downloads/checker-276.tar.bz2">checker-276.tar.bz2</a></b> (built February 19, 2014) +<b><a href="downloads/checker-277.tar.bz2">checker-277.tar.bz2</a></b> (built October 28, 2015) diff --git a/www/analyzer/release_notes.html b/www/analyzer/release_notes.html index 81f9c9a52da9..be78a1933c94 100644 --- a/www/analyzer/release_notes.html +++ b/www/analyzer/release_notes.html @@ -15,6 +15,36 @@ <h1>Release notes for <tt>checker-XXX</tt> builds</h1> +<h4 id="checker_277">checker-277</h4> +<p><b>built:</b> October 28, 2015</br> + <b>download:</b> <a href="downloads/checker-277.tar.bz2">checker-277.tar.bz2</a></p> + <p><b>highlights:</b></p> + <ul> + <li>Includes about 20 months of change to Clang itself.</li> + <li>New checker for C++ leaks is turned on by default.</li> + <li>Added various small checks and bug fixes.</li> + <li>Added experimental checkers for Objective-C:</li> + <ul> + <li>New localizability checks: + <ul> + <li>Checker warning about uses of non-localized <tt>NSString</tt>s passed to UI methods expecting localized strings.</li> + <li>Checker warning when the comment argument is missing from <tt>NSLocalizedString</tt> macros.</li> + <li>These can be enabled by passing the following command to <tt>scan-build</tt>: +<br /> + <tt>-enable-checker alpha.osx.cocoa.NonLocalizedStringChecker,alpha.osx.cocoa.EmptyLocalizationContextChecker</tt> +</li> + </ul> + </li> + <li>New checks for <tt>_Nonnull</tt> type qualifiers. These can be enabled with: +<br /> + <tt>-enable-checker nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull</tt></li> + <li>New checks for misuse of Objective-C generics. These can be enabled with <tt>-enable-checker alpha.osx.cocoa.ObjCGenerics</tt>.</li> + </ul> + <li>Support for <tt>cf_returns_retained</tt> and <tt>cf_returns_not_retained</tt> attributes in out-parameters.</li> + <li>The analyzer now creates one state for a range switch case instead of multiple, resulting in performance improvements.</li> + <li>Now requires OS X 10.7 or later. + </ul> + <h4 id="checker_276">checker-276</h4> <p><b>built:</b> February 19, 2014</br> <b>download:</b> <a href="downloads/checker-276.tar.bz2">checker-276.tar.bz2</a></p> diff --git a/www/analyzer/scan-build.html b/www/analyzer/scan-build.html index 28723e64eb80..04e93232a6b3 100644 --- a/www/analyzer/scan-build.html +++ b/www/analyzer/scan-build.html @@ -309,11 +309,11 @@ steps they need to take (e.g., setup code signing).</p> <h3>Recommendation: use "Build and Analyze"</h3> -<p>The absolute easiest way to analyze iPhone projects is to use the <a -href="http://developer.apple.com/mac/library/featuredarticles/StaticAnalysis/index.html"><i>Build -and Analyze</i> feature in Xcode 3.2</a> (which is based on the Clang Static -Analyzer). There a user can analyze their project with the click of a button -without most of the setup described later.</p> +<p>The absolute easiest way to analyze iPhone projects is to use the +<a href="https://developer.apple.com/library/ios/recipes/xcode_help-source_editor/chapters/Analyze.html#//apple_ref/doc/uid/TP40009975-CH4-SW1"><i>Analyze</i> +feature in Xcode</a> (which is based on the Clang Static Analyzer). There a +user can analyze their project right from a menu without most of the setup +described later.</p> <p><a href="/xcode.html">Instructions are available</a> on this website on how to use open source builds of the analyzer as a replacement for diff --git a/www/analyzer/xcode.html b/www/analyzer/xcode.html index e01f32b55ca8..8ccae81898d5 100644 --- a/www/analyzer/xcode.html +++ b/www/analyzer/xcode.html @@ -22,7 +22,7 @@ <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 +href="https://developer.apple.com/library/ios/recipes/xcode_help-source_editor/chapters/Analyze.html#//apple_ref/doc/uid/TP40009975-CH4-SW1">directly within Xcode</a>.</p> <p>It integrates directly with the Xcode build system and @@ -54,7 +54,7 @@ presents analysis results directly within Xcode's editor.</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 +href="https://developer.apple.com/library/ios/recipes/xcode_help-source_editor/chapters/Analyze.html#//apple_ref/doc/uid/TP40009975-CH4-SW1">instructions available</a> for using the analyzer.</p> <h2>Using open source analyzer builds with Xcode</h2> diff --git a/www/comparison.html b/www/comparison.html index 4bca65dc40d3..26f421d73b94 100644 --- a/www/comparison.html +++ b/www/comparison.html @@ -55,8 +55,8 @@ by Clang. For instance, in C mode, GCC supports <a href="http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html">nested functions</a> and has an - <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37428">undocumented - extension allowing VLAs in structs</a>. + <a href="https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html">extension + allowing VLAs in structs</a>. </ul> <p>Pro's of clang vs GCC:</p> @@ -95,12 +95,13 @@ that produced it (it is not a structured format).</li> <li>Clang is <a href="features.html#performance">much faster and uses far less memory</a> than GCC.</li> - <li>Clang aims to provide extremely clear and concise diagnostics (error and - warning messages), and includes support for <a - href="diagnostics.html">expressive diagnostics</a>. GCC's warnings are - sometimes acceptable, but are often confusing and it does not support - expressive diagnostics. Clang also preserves typedefs in diagnostics - consistently, showing macro expansions and many other features.</li> + <li>Clang has been designed from the start to provide extremely clear and + concise diagnostics (error and warning messages), and includes support + for <a href="diagnostics.html">expressive diagnostics</a>. + Modern versions of GCC have made significant advances in this area, + incorporating various Clang features such as preserving typedefs in + diagnostics and showing macro expansions, but GCC is still catching + up.</li> <li>GCC is licensed under the GPL license. <a href="features.html#license"> clang uses a BSD license,</a> which allows it to be embedded in software that is not GPL-licensed.</li> diff --git a/www/cxx_dr_status.html b/www/cxx_dr_status.html index 81b893aeb568..dd506a08ad45 100644 --- a/www/cxx_dr_status.html +++ b/www/cxx_dr_status.html @@ -28,7 +28,7 @@ <!--*************************************************************************--> <h1>C++ Defect Report Support in Clang</h1> <!--*************************************************************************--> -<p>Last updated: $Date: 2015-07-15 01:57:14 +0200 (Wed, 15 Jul 2015) $</p> +<p>Last updated: $Date: 2015-11-12 23:04:34 +0100 (Thu, 12 Nov 2015) $</p> <h2 id="cxxdr">C++ defect report implementation status</h2> @@ -2483,7 +2483,7 @@ of class templates</td> <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#407">407</a></td> <td>C++11</td> <td>Named class with associated typedef: two names or one?</td> - <td class="none" align="center">No</td> + <td class="svn" align="center">SVN</td> </tr> <tr id="408"> <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#408">408</a></td> diff --git a/www/cxx_status.html b/www/cxx_status.html index ec3424a25095..efcf82fd844a 100644 --- a/www/cxx_status.html +++ b/www/cxx_status.html @@ -25,7 +25,7 @@ <!--*************************************************************************--> <h1>C++ Support in Clang</h1> <!--*************************************************************************--> -<p>Last updated: $Date: 2015-05-22 03:11:10 +0200 (Fri, 22 May 2015) $</p> +<p>Last updated: $Date: 2015-11-26 03:23:21 +0100 (Thu, 26 Nov 2015) $</p> <p>Clang fully implements all published ISO C++ standards including <a href="#cxx11">C++11</a>, as well as the upcoming <a @@ -564,36 +564,65 @@ as the draft C++1z standard evolves.</p> <tr> <td>New <tt>auto</tt> rules for direct-list-initialization <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html">N3922</a></td> - <td class="none" align="center">No</td> + <td class="svn" align="center">Clang 3.8 <a href="#n3922">(7)</a></td> </tr> <!-- Urbana papers --> <tr> <td>Fold expressions</td> <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4295.html">N4295</a></td> - <td class="svn" align="center">Clang 3.6</td> + <td class="full" align="center">Clang 3.6</td> </tr> <tr> <td><tt>u8</tt> character literals</td> <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4267.html">N4267</a></td> - <td class="svn" align="center">Clang 3.6</td> + <td class="full" align="center">Clang 3.6</td> </tr> <tr> <td>Nested namespace definition</td> <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4230.html">N4230</a></td> - <td class="svn" align="center">Clang 3.6</td> + <td class="full" align="center">Clang 3.6</td> </tr> <tr> <td>Attributes for namespaces and enumerators</td> <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4266.html">N4266</a></td> - <td class="svn" align="center">Clang 3.6</td> + <td class="full" align="center">Clang 3.6</td> </tr> <tr> <td>Allow constant evaluation for all non-type template arguments</td> <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4268.html">N4268</a></td> - <td class="svn" align="center">Clang 3.6</td> + <td class="full" align="center">Clang 3.6</td> + </tr> + <!-- Kona papers --> + <tr> + <td>Remove deprecated <tt>register</tt> storage class</td> + <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0001r1.html">P0001R1</a></td> + <td class="svn" align="center">Clang 3.8</td> + </tr> + <tr> + <td>Remove deprecated <tt>bool</tt> increment</td> + <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0002r1.html">P0002R1</a></td> + <td class="svn" align="center">Clang 3.8</td> + </tr> + <tr> + <td>Make exception specifications part of the type system</td> + <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html">P0012R1</a></td> + <td class="none" align="center">No</td> + </tr> + <tr> + <td><tt>__has_include</tt> in preprocessor conditionals</td> + <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0061.html">P0061R1</a></td> + <td class="full" align="center">Yes</td> </tr> </table> +<p> +<span id="n3922">(7): This is a backwards-incompatible change that is applied to +all language versions that allow type deduction from <tt>auto</tt> +(per the request of the C++ committee). +In Clang 3.7, a warning is emitted for all cases that would change meaning. +</span> +</p> + <h2 id="ts">Technical specifications and standing documents</h2> <p>ISO C++ also publishes a number of documents describing additional language @@ -615,23 +644,42 @@ Clang version they became available:</p> </td> </tr> <tr> - <td class="svn" align="center"> + <td class="full" align="center"> Clang 3.6 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4200">N4200</a>)</a> </td> </tr> + <!-- FIXME: Implement latest recommendations. + <tr> + <td class="svn" align="center"> + SVN (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0096r0">P0096R0</a>)</a> + </td> + </tr> + --> + <!-- No compiler support is known to be needed for: + * Concurrency TS + * Parallelism TS + * Ranges TS + * Networking TS + * File System TS + --> + <tr> + <td>[TS] Concepts</td> + <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0121r0.pdf">P0121R0</a></td> + <td class="none" align="center">No</td> + </tr> <tr> - <td>[DRAFT TS] Array extensions (arrays of runtime bound)</td> - <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3820.html">N3820</a></td> + <td>[TS] Library Fundamentals, Version 1 (invocation type traits)</td> + <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html">N4480</a></td> <td class="none" align="center">No</td> </tr> <tr> - <td>[DRAFT TS] Library fundamentals (invocation type traits)</td> - <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3908.html">N3908</a></td> + <td>[DRAFT TS] Library Fundamentals, Version 2 (<tt>source_location</tt>)</td> + <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4529.html">N4529</a></td> <td class="none" align="center">No</td> </tr> <tr> - <td>[DRAFT TS] Concepts</td> - <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4377.pdf">N4377</a></td> + <td>[TS] Transactional Memory</td> + <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4514.pdf">N4514</a></td> <td class="none" align="center">No</td> </tr> </table> diff --git a/www/get_started.html b/www/get_started.html index 254745b82b5d..541c45a9146f 100644 --- a/www/get_started.html +++ b/www/get_started.html @@ -76,6 +76,14 @@ follows:</p> <li><tt>cd ../..</tt></li> </ul> </li> + <li>Checkout libcxx: (only required to build and run Compiler-RT tests on OS X, optional otherwise) + <ul> + <li><tt>cd llvm/projects</tt></li> + <li><tt>svn co http://llvm.org/svn/llvm-project/libcxx/trunk + libcxx</tt></li> + <li><tt>cd ../..</tt></li> + </ul> + </li> <li>Build LLVM and Clang: <ul> <li><tt>mkdir build</tt> (in-tree build is not supported)</li> @@ -101,7 +109,7 @@ follows:</p> 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 + scenarios, you can use the <tt>-DGCC_INSTALL_PREFIX</tt> cmake 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): diff --git a/www/related.html b/www/related.html index 62dd2632cd54..560787eb2236 100644 --- a/www/related.html +++ b/www/related.html @@ -82,6 +82,17 @@ </p> </dd> + <dt>DXR</dt> + <dd> + <p> + <b>Site:</b> + <a href="https://github.com/mozilla/dxr#dxr">https://github.com/mozilla/dxr</a> + </p> + <p> + DXR is a code search and navigation tool aimed at making sense of large projects like Firefox. It supports full-text and regex searches as well as structural queries like "Find all the callers of this function." + </p> + </dd> + </dl> </div> </body> |