Extend the "expected ';' after struct" logic to also apply to enums, and to
struct and enum forward-declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159164 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp
index b6cc2c0..0c837b4 100644
--- a/test/FixIt/fixit-cxx0x.cpp
+++ b/test/FixIt/fixit-cxx0x.cpp
@@ -108,3 +108,17 @@
 template<int *ip> struct IP { }; // expected-note{{declared here}}
 IP<0> ip0; // expected-error{{null non-type template argument must be cast to template parameter type 'int *'}}
 
+namespace MissingSemi {
+  struct a // expected-error {{expected ';' after struct}}
+  struct b // expected-error {{expected ';' after struct}}
+  enum x : int { x1, x2, x3 } // expected-error {{expected ';' after enum}}
+  struct c // expected-error {{expected ';' after struct}}
+  enum x : int // expected-error {{expected ';' after enum}}
+  // FIXME: The following gives a poor diagnostic (we parse the 'int' and the
+  // 'struct' as part of the same enum-base.
+  //   enum x : int
+  //   struct y
+  namespace N {
+    struct d // expected-error {{expected ';' after struct}}
+  }
+}