[cfe-commits] r157459 - in /cfe/trunk: docs/ReleaseNotes.html www/content.css

Richard Smith richard-llvm at metafoo.co.uk
Thu May 24 19:35:35 PDT 2012


Author: rsmith
Date: Thu May 24 21:35:34 2012
New Revision: 157459

URL: http://llvm.org/viewvc/llvm-project?rev=157459&view=rev
Log:
Release notes update for -Wsometimes-uninitialized.

Modified:
    cfe/trunk/docs/ReleaseNotes.html
    cfe/trunk/www/content.css

Modified: cfe/trunk/docs/ReleaseNotes.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ReleaseNotes.html?rev=157459&r1=157458&r2=157459&view=diff
==============================================================================
--- cfe/trunk/docs/ReleaseNotes.html (original)
+++ cfe/trunk/docs/ReleaseNotes.html Thu May 24 21:35:34 2012
@@ -83,9 +83,42 @@
 <h3 id="majorfeatures">Major New Features</h3>
 <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
 
-<h4 id="majorfeature1">Feature 1</h4>
+<h4 id="diagnostics">Improvements to Clang's diagnostics</h4>
+
+<p>Clang's diagnostics are constantly being improved to catch more issues,
+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
+  which always occur when an explicitly-written non-constant condition is either
+  <tt>true</tt> or <tt>false</tt>. For example:
+
+<pre>
+int f(bool b) {
+  int n;
+  if (b)
+    n = 1;
+  return n;
+}
+
+<b>sometimes-uninit.cpp:5:10: <span class="warning">warning:</span> variable 'n' is sometimes uninitialized when used here [-Wsometimes-uninitialized]</b>
+  return n;
+         <span class="caret">^</span>
+<b>sometimes-uninit.cpp:3:7: <span class="note">note:</span></b> uninitialized use occurs whenever 'if' condition is false
+  if (b)
+      <span class="caret">^</span>
+<b>sometimes-uninit.cpp:2:8: <span class="note">note:</span></b> initialize the variable 'n' to silence this warning
+  int n;
+       <span class="caret">^</span>
+       <span class="caret"> = 0</span>
+</pre>
+
+  This functionality can be enabled or disabled separately from
+  <tt>-Wuninitialized</tt> with the <tt>-Wsometimes-uninitialized</tt> warning
+  flag.</li>
+</ul>
 
-<p>...</p>
 
 <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
 <h3 id="cchanges">C Language Changes in Clang</h3>

Modified: cfe/trunk/www/content.css
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/content.css?rev=157459&r1=157458&r2=157459&view=diff
==============================================================================
--- cfe/trunk/www/content.css (original)
+++ cfe/trunk/www/content.css Thu May 24 21:35:34 2012
@@ -24,6 +24,8 @@
 .itemTitle { color:#2d58b7 }
 
 span.error { color:red }
+span.warning { color:purple }
+span.note { color:gray }
 span.caret { color:green; font-weight:bold }
 
 /* Tables */





More information about the cfe-commits mailing list