Retain attributes for K&R style parameter declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96941 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 30899c5..2416237 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -743,10 +743,11 @@
     // Handle the full declarator list.
     while (1) {
       // If attributes are present, parse them.
-      llvm::OwningPtr<AttributeList> AttrList;
-      if (Tok.is(tok::kw___attribute))
-        // FIXME: attach attributes too.
-        AttrList.reset(ParseGNUAttributes());
+      if (Tok.is(tok::kw___attribute)) {
+        SourceLocation Loc;
+        AttributeList *AttrList = ParseGNUAttributes(&Loc);
+        ParmDeclarator.AddAttributes(AttrList, Loc);
+      }
 
       // Ask the actions module to compute the type for this declarator.
       Action::DeclPtrTy Param =