- Use Tok.isObjCAtKeyword instead of Tok.getIdentifierInfo()->getObjCKeywordID().
   The later fails if the token is not an identifier.
 - Replace tabs with spaces.
 - Various other cleanups.

Patch by Nico Weber!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45368 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/objc-try-catch-1.m b/test/Parser/objc-try-catch-1.m
index 6a0acd1..d6ad8d3 100644
--- a/test/Parser/objc-try-catch-1.m
+++ b/test/Parser/objc-try-catch-1.m
@@ -10,29 +10,43 @@
 
 void * foo()
 {
-        @try {
-                return proc();
-        }
-        @catch (Frob* ex) {
-                @throw;
-        }
-        @catch (Frob1* ex) {
-                @throw proc();
-        }
-        @finally {
-	  @try {
-                return proc();
-          }
-          @catch (Frob* ex) {
-                @throw 1,2;
-          }
-	  @catch(...) {
-	    @throw (4,3,proc());
-	  }
-        }
+  @try {
+    return proc();
+  }
+  @catch (Frob* ex) {
+    @throw;
+  }
+  @catch (Frob1* ex) {
+    @throw proc();
+  }
+  @finally {
+    @try {
+      return proc();
+    }
+    @catch (Frob* ex) {
+      @throw 1,2;
+    }
+    @catch(...) {
+      @throw (4,3,proc());
+    }
+  }
 
-	@try {  // expected-error {{@try statment without a @catch and @finally clause}}
-                return proc();
-        }
+  @try {  // expected-error {{@try statment without a @catch and @finally clause}}
+    return proc();
+  }
+}
+
+
+void bar()
+{
+  @try {}// expected-error {{@try statment without a @catch and @finally clause}}
+  @"s" {} //  expected-warning {{result unused}} expected-error {{expected ';'}}
+}
+
+void baz()
+{
+  @try {}// expected-error {{@try statment without a @catch and @finally clause}}
+  @try {}// expected-error {{undeclared identifier}}
+  @finally {}
 }