From 94634ccd4fd4e2e6922f034d5ce3a09a55d3228b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 2 Feb 2010 01:35:23 +0000 Subject: add another example. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95043 91177308-0d34-0410-b5e6-96231b3b80d8 --- www/diagnostics.html | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'www/diagnostics.html') 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.

Quality of Implementation and Attention to Detail

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:

@@ -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.

+
+  $ cat t.cc
+  template<class T>
+  class a {}
+  class temp {};
+  a<temp> b;
+  struct b {
+  }
+  $ gcc-4.2 t.cc
+  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
+  $ clang t.cc
+  t.cc:2:11: error: expected ';' after class
+  class a {}
+            ^
+            ;
+  t.cc:6:2: error: expected ';' after struct
+  }
+   ^
+   ;
+
+ +

This shows that we recover from the simple case of forgetting a ; after +a struct definition much better than GCC.

+

While each of these details is minor, we feel that they all add up to provide a much more polished experience.

-- cgit v1.2.1