move some code from all callers of ProcessDeclAttributes into 
the implementation of ProcessDeclAttributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52875 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 752a0fb..cdb5485 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -54,8 +54,10 @@
          ClsName == &Ctx.Idents.get("NSMutableString");
 }
 
-void Sema::ProcessDeclAttributes(Decl *D, const AttributeList *DeclSpecAttrs,
-                                 const AttributeList *DeclaratorAttrs) {
+void Sema::ProcessDeclAttributes(Decl *D, Declarator &PD) {
+  const AttributeList *DeclSpecAttrs = PD.getDeclSpec().getAttributes();
+  const AttributeList *DeclaratorAttrs = PD.getAttributes();
+  
   if (DeclSpecAttrs == 0 && DeclaratorAttrs == 0) return;
 
   ProcessDeclAttributeList(D, DeclSpecAttrs);