]> granicus.if.org Git - clang/commitdiff
Handle parameter attributes
authorNate Begeman <natebegeman@mac.com>
Sun, 17 Feb 2008 21:02:04 +0000 (21:02 +0000)
committerNate Begeman <natebegeman@mac.com>
Sun, 17 Feb 2008 21:02:04 +0000 (21:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47243 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaDecl.cpp

index 6a718aef9157c7123d7911d60447f3a997d1be27..9a19928ce7d171ee9e9522ce1e1b0b19930837b2 100644 (file)
@@ -936,8 +936,8 @@ Sema::DeclTy *Sema::FinalizeDeclaratorGroup(Scope *S, DeclTy *group) {
 
 // Called from Sema::ParseStartOfFunctionDef().
 ParmVarDecl *
-Sema::ActOnParamDeclarator(struct DeclaratorChunk::ParamInfo &PI, Scope *FnScope) 
-{
+Sema::ActOnParamDeclarator(struct DeclaratorChunk::ParamInfo &PI,
+                           Scope *FnScope) {
   IdentifierInfo *II = PI.Ident;
   // TODO: CHECK FOR CONFLICTS, multiple decls with same name in one scope.
   // Can this happen for params?  We already checked that they don't conflict
@@ -977,7 +977,6 @@ Sema::ActOnParamDeclarator(struct DeclaratorChunk::ParamInfo &PI, Scope *FnScope
   
   ParmVarDecl *New = new ParmVarDecl(PI.IdentLoc, II, parmDeclType, 
                                      VarDecl::None, 0);
-  // FIXME: Handle attributes
   
   if (PI.InvalidType)
     New->setInvalidDecl();
@@ -989,6 +988,7 @@ Sema::ActOnParamDeclarator(struct DeclaratorChunk::ParamInfo &PI, Scope *FnScope
     FnScope->AddDecl(New);
   }
 
+  HandleDeclAttributes(New, PI.AttrList, 0);
   return New;
 }