Fix a couple crashes on invalid input.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51622 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 936604e..2296f57 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -328,6 +328,7 @@
 
     if (!Result.isInvalid)
       return Actions.ActOnFileScopeAsmDecl(Tok.getLocation(), Result.Val);
+    return 0;
   }
   case tok::at:
     // @ is not a legal token unless objc is enabled, no need to check.
@@ -653,7 +654,7 @@
   
   if (Tok.isNot(tok::l_paren)) {
     Diag(Tok, diag::err_expected_lparen_after, "asm");
-    return 0;
+    return true;
   }
   
   ConsumeParen();
diff --git a/test/Parser/asm.c b/test/Parser/asm.c
index 6a19aca..c23d31a 100644
--- a/test/Parser/asm.c
+++ b/test/Parser/asm.c
@@ -8,3 +8,8 @@
   asm("foo" : "=r" (a)); // expected-error {{use of undeclared identifier 'a'}}
   asm("foo" : : "r" (b)); // expected-error {{use of undeclared identifier 'b'}} 
 }
+
+
+// rdar://5952468
+__asm ; // expected-error {{expected '(' after 'asm'}}
+