Fix <rdar://problem/6635908> crash on invalid


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65909 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/method-no-context.m b/test/SemaObjC/method-no-context.m
new file mode 100644
index 0000000..484322e
--- /dev/null
+++ b/test/SemaObjC/method-no-context.m
@@ -0,0 +1,4 @@
+// RUN: clang -fsyntax-only -verify %s
+
+- im0 { int a; return 0; // expected-error{{missing context for method declaration}}
+// expected-error{{expected '}'}}