AST for objective-c's @throw statement and its pretty-printing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43802 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/ParseObjc.cpp b/Parse/ParseObjc.cpp
index 4290fc5..a149b86 100644
--- a/Parse/ParseObjc.cpp
+++ b/Parse/ParseObjc.cpp
@@ -1052,16 +1052,18 @@
 ///  objc-throw-statement:
 ///    throw expression[opt];
 ///
-Parser::DeclTy *Parser::ParseObjCThrowStmt(SourceLocation atLoc) {
+Parser::StmtResult Parser::ParseObjCThrowStmt(SourceLocation atLoc) {
+  ExprResult Res;
   ConsumeToken(); // consume throw
   if (Tok.isNot(tok::semi)) {
-    ExprResult Res = ParseExpression();
+    Res = ParseExpression();
     if (Res.isInvalid) {
       SkipUntil(tok::semi);
-      return 0;
+      return true;
     }
   }
-  return 0;
+  ConsumeToken(); // consume ';'
+  return Actions.ActOnObjcAtThrowStmt(atLoc, Res.Val);
 }
 
 ///  objc-try-catch-statement: