PR10101: Recover better from a common copy-paste error: if a function
declaration at namespace scope is followed by a semicolon and an open-brace
(or in C++, a 'try', ':' or '='), then the error is probably a function
definition with a spurious ';', rather than a mysterious '{'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145372 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp
index 86b3977..7c8ba9a 100644
--- a/test/FixIt/fixit.cpp
+++ b/test/FixIt/fixit.cpp
@@ -125,3 +125,13 @@
   AD ad, // expected-error {{expected ';' at end of declaration}}
   return ad;
 }
+
+int extraSemi1(); // expected-error {{stray ';' in function definition}}
+{
+  return 0;
+}
+
+int extraSemi2(); // expected-error {{stray ';' in function definition}}
+try {
+} catch (...) {
+}