Index: include/clang/Frontend/TypeXML.def
===================================================================
--- include/clang/Frontend/TypeXML.def	(revision 113840)
+++ include/clang/Frontend/TypeXML.def	(working copy)
@@ -130,6 +130,8 @@
   ID_ATTRIBUTE_XML
   ATTRIBUTE_XML(getResultType(), "result_type")
   ATTRIBUTE_OPT_XML(isVariadic(), "variadic")
+  ATTRIBUTE_XML(getRegParmType(), "regparm")
+  ATTRIBUTE_OPT_XML(getNoReturnAttr(), "noreturn")
   ATTRIBUTE_ENUM_XML(getCallConv(), "call_conv")
 	  ENUM_XML(CC_Default, "")
 	  ENUM_XML(CC_C, "C")
Index: lib/Sema/SemaType.cpp
===================================================================
--- lib/Sema/SemaType.cpp	(revision 113840)
+++ lib/Sema/SemaType.cpp	(working copy)
@@ -395,11 +395,6 @@
   assert(DS.getTypeSpecComplex() != DeclSpec::TSC_imaginary &&
          "FIXME: imaginary types not supported yet!");
 
-  // See if there are any attributes on the declspec that apply to the type (as
-  // opposed to the decl).
-  if (const AttributeList *AL = DS.getAttributes())
-    ProcessTypeAttributeList(TheSema, Result, true, AL, Delayed);
-
   // Apply const/volatile/restrict qualifiers to T.
   if (unsigned TypeQuals = DS.getTypeQualifiers()) {
 
@@ -994,6 +989,11 @@
     break;
   }
   
+  // See if there are any attributes on the declspec that apply to the type (as
+  // opposed to the decl).
+  if (const AttributeList *AL = D.getDeclSpec().getAttributes())
+    ProcessTypeAttributeList(*this, T, true, AL, FnAttrsFromDeclSpec);
+
   if (T.isNull())
     return Context.getNullTypeSourceInfo();
 
