[cfe-commits] r47243 - /cfe/trunk/Sema/SemaDecl.cpp

Nate Begeman natebegeman at mac.com
Sun Feb 17 13:02:04 PST 2008


Author: sampo
Date: Sun Feb 17 15:02:04 2008
New Revision: 47243

URL: http://llvm.org/viewvc/llvm-project?rev=47243&view=rev
Log:
Handle parameter attributes

Modified:
    cfe/trunk/Sema/SemaDecl.cpp

Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=47243&r1=47242&r2=47243&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Sun Feb 17 15:02:04 2008
@@ -936,8 +936,8 @@
 
 // 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 @@
   
   ParmVarDecl *New = new ParmVarDecl(PI.IdentLoc, II, parmDeclType, 
                                      VarDecl::None, 0);
-  // FIXME: Handle attributes
   
   if (PI.InvalidType)
     New->setInvalidDecl();
@@ -989,6 +988,7 @@
     FnScope->AddDecl(New);
   }
 
+  HandleDeclAttributes(New, PI.AttrList, 0);
   return New;
 }
 





More information about the cfe-commits mailing list