Have the parser communicate the exception specification to the action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70389 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/DeclSpec.cpp b/lib/Parse/DeclSpec.cpp
index bcf14d9..d742ef2 100644
--- a/lib/Parse/DeclSpec.cpp
+++ b/lib/Parse/DeclSpec.cpp
@@ -32,19 +32,27 @@
                                              ParamInfo *ArgInfo,
                                              unsigned NumArgs,
                                              unsigned TypeQuals,
+                                             bool hasExceptionSpec,
+                                             bool hasAnyExceptionSpec,
+                                             ActionBase::TypeTy **Exceptions,
+                                             unsigned NumExceptions,
                                              SourceLocation Loc,
                                              Declarator &TheDeclarator) {
   DeclaratorChunk I;
-  I.Kind             = Function;
-  I.Loc              = Loc;
-  I.Fun.hasPrototype = hasProto;
-  I.Fun.isVariadic   = isVariadic;
-  I.Fun.EllipsisLoc  = EllipsisLoc.getRawEncoding();
-  I.Fun.DeleteArgInfo = false;
-  I.Fun.TypeQuals    = TypeQuals;
-  I.Fun.NumArgs      = NumArgs;
-  I.Fun.ArgInfo      = 0;
-  
+  I.Kind                 = Function;
+  I.Loc                  = Loc;
+  I.Fun.hasPrototype     = hasProto;
+  I.Fun.isVariadic       = isVariadic;
+  I.Fun.EllipsisLoc      = EllipsisLoc.getRawEncoding();
+  I.Fun.DeleteArgInfo    = false;
+  I.Fun.TypeQuals        = TypeQuals;
+  I.Fun.NumArgs          = NumArgs;
+  I.Fun.ArgInfo          = 0;
+  I.Fun.hasExceptionSpec = hasExceptionSpec;
+  I.Fun.hasAnyExceptionSpec = hasAnyExceptionSpec;
+  I.Fun.NumExceptions    = NumExceptions;
+  I.Fun.Exceptions       = 0;
+
   // new[] an argument array if needed.
   if (NumArgs) {
     // If the 'InlineParams' in Declarator is unused and big enough, put our
@@ -62,6 +70,12 @@
     }
     memcpy(I.Fun.ArgInfo, ArgInfo, sizeof(ArgInfo[0])*NumArgs);
   }
+  // new[] an exception array if needed
+  if (NumExceptions) {
+    I.Fun.Exceptions = new ActionBase::TypeTy*[NumExceptions];
+    memcpy(I.Fun.Exceptions, Exceptions,
+           sizeof(ActionBase::TypeTy*)*NumExceptions);
+  }
   return I;
 }