summaryrefslogtreecommitdiff
path: root/www/diagnostics.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-02 01:35:23 +0000
committerChris Lattner <sabre@nondot.org>2010-02-02 01:35:23 +0000
commit94634ccd4fd4e2e6922f034d5ce3a09a55d3228b (patch)
tree520680d5d58e447b47e9b0f04843bb8cee9078b5 /www/diagnostics.html
parent4ed5d91db256f7dbe6bf716da0b801004c197254 (diff)
downloadclang-94634ccd4fd4e2e6922f034d5ce3a09a55d3228b.tar.gz
add another example.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www/diagnostics.html')
-rw-r--r--www/diagnostics.html29
1 files changed, 28 insertions, 1 deletions
diff --git a/www/diagnostics.html b/www/diagnostics.html
index 18f1bc7ff0..4f7d025b8e 100644
--- a/www/diagnostics.html
+++ b/www/diagnostics.html
@@ -281,7 +281,7 @@ macros that in simple ones.</p>
<h2>Quality of Implementation and Attention to Detail</h2>
<p>Finally, we have put a lot of work polishing the little things, because
-little things add up over time and contribute to a great user experience. Two
+little things add up over time and contribute to a great user experience. Three
examples are:</p>
<pre>
@@ -314,6 +314,33 @@ and caret diagnostics, because otherwise you don't get the important context.
of GCC is completely useless for diagnosing the problem, Clang tries much harder
and produces a much more useful diagnosis of the problem.</p>
+<pre>
+ $ <b>cat t.cc</b>
+ template&lt;class T&gt;
+ class a {}
+ class temp {};
+ a&lt;temp&gt; b;
+ struct b {
+ }
+ $ <b>gcc-4.2 t.cc</b>
+ t.cc:3: error: multiple types in one declaration
+ t.cc:4: error: non-template type 'a' used as a template
+ t.cc:4: error: invalid type in declaration before ';' token
+ t.cc:6: error: expected unqualified-id at end of input
+ $ <b>clang t.cc</b>
+ t.cc:2:11: <font color="red">error:</font> expected ';' after class
+ <font color="darkgreen">class a {}</font>
+ <font color="blue"> ^</font>
+ <font color="blue"> ;</font>
+ t.cc:6:2: <font color="red">error:</font> expected ';' after struct
+ <font color="darkgreen">}</font>
+ <font color="blue"> ^</font>
+ <font color="blue"> ;</font>
+</pre>
+
+<p>This shows that we recover from the simple case of forgetting a ; after
+a struct definition much better than GCC.</p>
+
<p>While each of these details is minor, we feel that they all add up to provide
a much more polished experience.</p>