summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-12-24 01:13:46 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-12-24 01:13:46 +0100
commitade67ee4fcb3d14c87d117639c504fe9a7a55027 (patch)
tree5531d6e8af1daad6a2602bf44a0a8b7c972089c4
parent860c7d8c7dec1a2a7276adb0b47ae4efce83d206 (diff)
parent464ef46ac3cf4a1424c7dfdc12a42f2cb5e8c357 (diff)
downloadclang-ade67ee4fcb3d14c87d117639c504fe9a7a55027.tar.gz
clang-ade67ee4fcb3d14c87d117639c504fe9a7a55027.tar.bz2
clang-ade67ee4fcb3d14c87d117639c504fe9a7a55027.tar.xz
Merge branch 'release-3.2' into embtk-support-release-3.2
-rw-r--r--docs/ReleaseNotes.html106
-rw-r--r--lib/Driver/ToolChains.cpp6
2 files changed, 64 insertions, 48 deletions
diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html
index 8a195f0b83..a1ba15ce1c 100644
--- a/docs/ReleaseNotes.html
+++ b/docs/ReleaseNotes.html
@@ -43,12 +43,6 @@ td {
<p>Written by the <a href="http://llvm.org/">LLVM Team</a></p>
</div>
-<h1 style="color:red">These are in-progress notes for the upcoming Clang 3.2
-release.<br>
-You may prefer the
-<a href="http://llvm.org/releases/3.1/docs/ClangReleaseNotes.html">Clang 3.1
-Release Notes</a>.</h1>
-
<!-- ======================================================================= -->
<h2 id="intro">Introduction</h2>
<!-- ======================================================================= -->
@@ -91,7 +85,7 @@ explain them more clearly, and provide more accurate source information about
them. The improvements since the 3.1 release include:</p>
<ul>
- <li><tt>-Wuninitialized</tt> has been taught to recognise uninitialized uses
+ <li><tt>-Wuninitialized</tt> has been taught to recognize uninitialized uses
which always occur when an explicitly-written non-constant condition is either
<tt>true</tt> or <tt>false</tt>. For example:
@@ -170,14 +164,11 @@ int f(vector&lt;map&lt;int, double&gt;&gt;);
</li>
- <li>Clang's <tt>-fcatch-undefined-behavior</tt> option has been renamed to
- <tt>-fsanitize=undefined</tt> and has grown the ability to check for several
- new types of undefined behavior. See the Users Manual for more information.
-
- <!-- Flesh this out prior to release. -->
-
- <!-- Document renaming of -faddress-sanitizer and -fthread-sanitizer. -->
-
+ <li>The Address Sanitizer feature and Clang's <tt>-fcatch-undefined-behavior</tt> option have been moved to a unified flag set:
+ <tt>-fsanitize</tt>. This flag can be used to enable the different dynamic checking tools when building. For example,
+ <tt>-faddress-sanitizer</tt> is now <tt>-fsanitize=address</tt>, and <tt>-fcatch-undefined-behavior</tt> is now
+ <tt>-fsanitize=undefined</tt>. With this release the set of checks available continues to grow, see the Clang
+ documentation and specific sanitizer notes below for details.
</li>
</ul>
@@ -215,6 +206,35 @@ function call.</p>
<code>pointer_with_type_tag</code> and <code>type_tag_for_datatype</code>
attributes in Clang language extensions documentation.</p>
+<h4>Documentation comment support</h4>
+<p>Clang now supports documentation comments written in a Doxygen-like syntax.
+Clang parses the comments and can detect syntactic and semantic errors in
+comments. These warnings are off by default. Pass <tt>-Wdocumentation</tt>
+flag to enable warnings about documentation comments.</p>
+
+<p>For example, given:</p>
+
+<pre>/// \param [in] Str the string.
+/// \returns a modified string.
+void do_something(const std::string &amp;str);</pre>
+
+<p><tt>clang -Wdocumentation</tt> will emit two warnings:</p>
+
+<pre><b>doc-test.cc:3:6: <span class="warning">warning:</span></b> '\returns' command used in a comment that is attached to a function returning void [-Wdocumentation]
+/// \returns a modified string.
+ <span class="caret">~^~~~~~~~~~~~~~~~~~~~~~~~~~</span>
+<b>doc-test.cc:2:17: <span class="warning">warning:</span></b> parameter 'Str' not found in the function declaration [-Wdocumentation]
+/// \param [in] Str the string.
+ <span class="caret">^~~</span>
+<b>doc-test.cc:2:17: <span class="note">note:</span></b> did you mean 'str'?
+/// \param [in] Str the string.
+ <span class="caret">^~~</span>
+ <span class="caret">str</span></pre>
+
+<p>libclang includes a new API, <tt>clang_FullComment_getAsXML</tt>, to convert
+comments to XML documents. This API can be used to build documentation
+extraction tools.</p>
+
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3 id="newflags">New Compiler Flags</h3>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
@@ -239,7 +259,8 @@ attributes in Clang language extensions documentation.</p>
<h4 id="c11changes">C11 Feature Support</h4>
-<p>...</p>
+<p>Clang 3.2 adds support for the C11 <code>_Alignof</code> keyword, pedantic warning through option
+ <code>-Wempty-translation-unit</code> (C11 6.9p1) </p>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3 id="cxxchanges">C++ Language Changes in Clang</h3>
@@ -247,40 +268,42 @@ attributes in Clang language extensions documentation.</p>
<h4 id="cxx11changes">C++11 Feature Support</h4>
-<p>...</p>
-
-<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
-<h3 id="objcchanges">Objective-C Language Changes in Clang</h3>
-<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
+<p>Clang 3.2 supports <a href="http://clang.llvm.org/cxx_status.html#cxx11">most of the language features</a>
+ added in the latest ISO C++ standard,<a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">C++ 2011</a>.
+ Use <code>-std=c++11</code> or <code>-std=gnu++11</code> to enable support for these features. In addition to the features supported by Clang 3.1, the
+ following features have been added:</p>
-<p>...</p>
+<ul>
+ <li>Implemented the C++11 discarded value expression rules for volatile lvalues.</li>
+ <li>Support for the C++11 enum forward declarations.</li>
+ <li>Handling of C++11 attribute namespaces (automatically).</li>
+ <li>Implemented C++11 [conv.prom]p4: an enumeration with a fixed underlying type has integral promotions
+ to both its underlying type and to its underlying type's promoted type.</li>
+</ul>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
-<h3 id="apichanges">Internal API Changes</h3>
+<h3 id="objcchanges">Objective-C Language Changes in Clang</h3>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
-<p>These are major API changes that have happened since the 3.1 release of
- Clang. If upgrading an external codebase that uses Clang as a library, this
- section should help get you past the largest hurdles of upgrading.</p>
-
-<h4 id="api1">API change 1</h4>
-
-<p>...</p>
+<p>Bug-fixes, no functionality changes.</p>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3 id="pythonchanges">Python Binding Changes</h3>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
-The following methods have been added:
+The following classes and methods have been added:
<ul>
- <li>...</li>
+ <li>class CompilationDatabaseError(Exception)</li>
+ <li>class CompileCommand(object)</li>
+ <li>class CompileCommands(object)</li>
+ <li>class CompilationDatabase(ClangObject)</li>
+ <li>Cursor.is_static_method</li>
+ <li>Cursor.is_static_method</li>
+ <li>SourceLocation.from_offset</li>
+ <li>Cursor.is_static_method</li>
</ul>
<!-- ======================================================================= -->
-<h2 id="knownproblems">Significant Known Problems</h2>
-<!-- ======================================================================= -->
-
-<!-- ======================================================================= -->
<h2 id="additionalinfo">Additional Information</h2>
<!-- ======================================================================= -->
@@ -296,17 +319,6 @@ The following methods have been added:
the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev"> mailing
list</a>.</p>
-<!-- ======================================================================= -->
-<!-- Likely 3.1 release notes -->
-<!-- ======================================================================= -->
-<!--
-This is just a section to hold things that have already gotten started and
-should likely pick up proper release notes in 3.1.
-
-- C1X and C++11 atomics infrastructure and support
-- CUDA support?
-
--->
</div>
</body>
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index a2ccb35ed2..7d70cd50de 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -1855,6 +1855,8 @@ enum LinuxDistro {
UbuntuNatty,
UbuntuOneiric,
UbuntuPrecise,
+ UbuntuQuantal,
+ UbuntuRaring,
UnknownDistro
};
@@ -1872,7 +1874,7 @@ static bool IsDebian(enum LinuxDistro Distro) {
}
static bool IsUbuntu(enum LinuxDistro Distro) {
- return Distro >= UbuntuHardy && Distro <= UbuntuPrecise;
+ return Distro >= UbuntuHardy && Distro <= UbuntuRaring;
}
static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
@@ -1894,6 +1896,8 @@ static LinuxDistro DetectLinuxDistro(llvm::Triple::ArchType Arch) {
.Case("natty", UbuntuNatty)
.Case("oneiric", UbuntuOneiric)
.Case("precise", UbuntuPrecise)
+ .Case("quantal", UbuntuQuantal)
+ .Case("raring", UbuntuRaring)
.Default(UnknownDistro);
return Version;
}