From 94634ccd4fd4e2e6922f034d5ce3a09a55d3228b Mon Sep 17 00:00:00 2001
From: Chris Lattner
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.
-- 2.40.0