Try to recover a bit better if a close brace is missing from the end of a class
definition. If we see something that looks like a namespace definition inside a
class, that strongly indicates that a close brace was missing somewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194319 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/recovery.cpp b/test/Parser/recovery.cpp
index ac1be6a..54e1b0a 100644
--- a/test/Parser/recovery.cpp
+++ b/test/Parser/recovery.cpp
@@ -35,6 +35,17 @@
 
 5int m = { l }, n = m; // expected-error {{unqualified-id}}
 
+namespace MissingBrace {
+  struct S { // expected-error {{missing '}' at end of definition of 'MissingBrace::S'}}
+    int f();
+  // };
+
+  namespace N { int g(); } // expected-note {{still within definition of 'MissingBrace::S' here}}
+
+  int k1 = S().h(); // expected-error {{no member named 'h' in 'MissingBrace::S'}}
+  int k2 = S().f() + N::g();
+}
+
 namespace N {
   int
 } // expected-error {{unqualified-id}}